Returning a permission denial from an MCP tool to the agent
CCAR-F
Tool Design & MCP Integration
Medium
Question 8 of 59
An MCP maintenance tool rejects a work-order request because the caller's role lacks the write permission. The tools/call request was well-formed and named an existing tool, the arguments were correct and no change the model can make to them would succeed, and the denial stands until a named approver grants the role. Today the tool returns an empty string, and the agent tells the technician the work order was created.
What should the tool result carry instead?
Show answer and explanation
AisError true, with text naming the missing role and the approver who grants it
A permission denial is a business-logic failure on a valid call, so it belongs in the tool result with isError true, and the text has to be instructive rather than generic: naming the role and who grants it lets the agent tell the technician what happened and what to do next, and makes clear that no work order exists. A retry-after interval is the documented shape for a rate limit, where waiting fixes it; here it turns a permanent denial into wasted turns. Format and rejected value is what an input validation error carries, because the model can correct an argument, and it cannot grant itself a role. A JSON-RPC error describes a malformed request or an unknown tool.
Source: modelcontextprotocol.io/
Anonymous, no account needed. Your tally stays in this browser.
Practice by topic: MCP questions