Problem
The outbound MCP connector assumes a remote call returns a final JSON-RPC result or error. It unwraps normal MCP tool results, but does not handle multi-round interactions where the MCP server needs more input from the user before completing the call.
Current MCP supports input-required style results / multi-round trip requests for cases like:
- missing required user input
- confirmation before a risky action
- choosing among app resources
- provider-specific consent/step-up prompts
Without this, a PAGS MCP agent may connect successfully but fail or hallucinate when a remote server asks for more information.
Expected behavior
When a remote MCP call returns input-required data, PAGS should pause the tool call, surface the request to the user, collect the answer, and retry/resume the original call with the provided input responses.
Acceptance criteria
- Outbound MCP client detects input-required responses instead of treating them as final opaque data.
- Chat UI can render the requested inputs/confirmation clearly.
- User answer is routed back to the original remote call.
- The resumed call preserves endpoint, remote tool, args, auth context, and audit trace.
- Timeouts/cancel paths are clear.
- Sensitive input requests are handled carefully and are not stored in memory or logs unless explicitly safe/redacted.
- Tests cover successful resume, user cancellation, timeout, and malformed input-required payload.
Related
Code pointers
workers/api/src/lib/connectors/mcp.ts
workers/api/src/routes/instances.ts
store/console/src/pages/InstanceDetail.tsx
Problem
The outbound MCP connector assumes a remote call returns a final JSON-RPC result or error. It unwraps normal MCP tool results, but does not handle multi-round interactions where the MCP server needs more input from the user before completing the call.
Current MCP supports input-required style results / multi-round trip requests for cases like:
Without this, a PAGS MCP agent may connect successfully but fail or hallucinate when a remote server asks for more information.
Expected behavior
When a remote MCP call returns input-required data, PAGS should pause the tool call, surface the request to the user, collect the answer, and retry/resume the original call with the provided input responses.
Acceptance criteria
Related
Code pointers
workers/api/src/lib/connectors/mcp.tsworkers/api/src/routes/instances.tsstore/console/src/pages/InstanceDetail.tsx