NewToolResultAwaitingFormSubmission signals to the agent that a tool call has been intercepted to show an MCP App form to the user and has NOT performed the requested operation. The agent must stop, not chain dependent tool calls, and not claim the operation succeeded. The result is marked IsError=t
(message string)
| 70 | // clicks submit, after which a ui/update-model-context call delivers the real |
| 71 | // outcome to the agent. |
| 72 | func NewToolResultAwaitingFormSubmission(message string) *mcp.CallToolResult { |
| 73 | return &mcp.CallToolResult{ |
| 74 | Content: []mcp.Content{ |
| 75 | &mcp.TextContent{ |
| 76 | Text: message, |
| 77 | }, |
| 78 | }, |
| 79 | StructuredContent: map[string]any{ |
| 80 | "status": "awaiting_user_submission", |
| 81 | "reason": "An interactive form is being shown to the user. The operation has not been performed.", |
| 82 | }, |
| 83 | IsError: true, |
| 84 | } |
| 85 | } |
no outgoing calls
no test coverage detected