Skip to main content

OpenAI Assistants Tool Calls

The Assistants mapper converts OpenAI tool_call envelopes into MCP tools/call bodies. OpenAI stringified function arguments are parsed as JSON objects, validated at the protocol boundary, and sent to MCP with the tenant context derived from the validated bearer token.

Streaming MCP events are converted to OpenAI SSE data: ... frames. Content chunks preserve arrival order, tool-call deltas remain correlated by tool_call_id, and wrapped OpenAIToolCallError payloads close the SSE channel cleanly with data: [DONE].

Parallel tool_calls fan out concurrently when parallel_tool_calls is true. Results are returned in input order, and metrics use the bounded mcp_call_kind enum: sync, streaming, or parallel.