Tools and state

openai_mcp_dispatch

Executes MCP tool calls against upstream MCP servers within the Responses API agentic loop.

Praxis AI v0.12.1 (alpha) 3 min read
On this page

Executes MCP tool calls against upstream MCP servers within the Responses API agentic loop.

Configuration

FieldTypeRequiredDescription
user_credentialstringnoOptional per-user bearer slot from callout_credentials. Must match the corresponding openai_mcp_tool_resolve setting.
authorization_assertionstringnoOptional opaque assertion slot from callout_credentials.assertions. Must match the corresponding openai_mcp_tool_resolve setting.
outbound_chainstring | objectnoInline outbound filter chain the MCP tools/call callout runs through. openai_mcp_dispatch runs inside an iterative_request_router step. praxis core builds each IRR step with a live chain-binding context, so an inline chain ({ name, filters }) is bound at step-build time. A named reference is rejected: IRR supplies each step an empty top-level named-chain map, so a Named reference can never resolve inside a step (see [require_inline_outbound_chain]). The chain carries only operator-configured cross-cutting filters — the SSRF-validated dial target is staged by the transport, so no upstream-selecting filter is prepended. When omitted, the callout runs through an empty chain and dials the staged target directly. Whether loopback/private MCP destinations are permitted is governed by the operator’s global insecure posture, not a per-filter flag.
forward_headersstring[]noTrusted request headers forwarded to connector-backed MCP tools/call requests. No request headers are forwarded by default. Credential headers such as authorization are rejected because MCP destinations are client-selected; use the MCP tool entry’s dedicated authorization field instead. Direct, client-selected server_url targets never receive ambient request headers.
minimum_approvalalwaysnoOperator approval floor applied to every MCP call in this pipeline, combined monotonically with each tool’s client require_approval: approval_required = operator_floor || client_requires_approval. Set always to require approval for every MCP call regardless of the client’s request — a client "never" or a server-supplied readOnlyHint can never suppress it. Pending approvals are correlated through previous_response_id, so the pipeline needs openai_responses_store and openai_responses_rehydrate; without persistence the request fails closed (store: false → 400, no store → 500). Omit to preserve the client-driven behavior (the default).
timeout_msintegernoPer-call timeout in milliseconds for tools/call calls. Inside an iterative request router, every MCP exchange is capped by the router’s remaining deadline.
max_calls_per_roundintegernoHard cap on MCP calls processed from one model response, and the maximum number of mcp_approval_response items accepted from a single resume request — a resume batch cannot exceed what one round could have emitted (1..=1024; default: 32).
max_parallel_callsintegernoMaximum concurrent MCP calls when parallel_tool_calls is enabled (1..=64; default: 8).
max_result_bytesintegernoMaximum retained bytes for one MCP result (minimum: 1 KiB; default: 1 MiB).
max_total_result_bytesintegernoMaximum retained bytes across one MCP result batch (default: 8 MiB).

Examples

Example 1

filter: openai_mcp_dispatch

Example 2

filter: openai_mcp_dispatch
minimum_approval: always
forward_headers:
  - x-tenant-id
  - x-user-id
timeout_ms: 30000
max_calls_per_round: 32
max_parallel_calls: 8
max_result_bytes: 1048576
max_total_result_bytes: 8388608