Resolve SAP MCP Next Action
sap_agent_next_actionFree routing resolver for SAP MCP errors and partial results. Use this before retrying after payment_required, hosted_local_signer_required, BlockhashNotFound, missing sap_payments, timeout, or a submitted signature that has not confirmed.
SAP MCP execution guidance: Intent: agent bootstrap, routing, skills, or repair guidance. Pricing: free; call directly without x402. Routing: free hosted call; call directly and keep it small/exact when possible. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent | No | Current user intent or workflow area. | |
| toolName | No | Tool that produced the error or partial result, for example sap_register_agent, sap_update_agent, or sap_create_escrow_v2. | |
| errorCode | No | Machine error code when available, for example hosted_local_signer_required, payment_required, BlockhashNotFound, or expired_or_not_landed. | |
| errorMessage | No | Human or structured error message returned by the runtime, hosted server, local bridge, or wallet/RPC layer. | |
| hasSignature | No | True when a transaction signature was already produced or submitted. This prevents unsafe duplicate retries. | |
| paymentRequired | No | True when the previous response was an x402/pay.sh payment challenge. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Whether the resolver produced guidance. | |
| nextTool | Yes | Exact preferred next SAP MCP tool, or null when user/runtime action is needed. | |
| retryable | Yes | Whether the underlying issue can generally be retried. | |
| nextAction | Yes | Concrete next action for the agent. | |
| userMessage | Yes | Short user-facing explanation. | |
| classification | Yes | Normalized error or routing classification. | |
| paymentCharged | Yes | Best-effort payment status: no, unknown, possible, or yes. | |
| safeToRetryNow | Yes | Whether the agent should retry immediately without risking duplicate writes or duplicate user charges. | |
| forbiddenActions | Yes | Actions the agent must not take for this case. |