OpenAI MCP Approval Request Validation Before a User Decides
OpenAI emits an mcp_approval_request output item before a protected MCP tool call. Applications should validate its type and identifier, server label, tool name, and serialized arguments before showing an approval prompt or accepting a decision. This guide defines a fail-closed validation record and a safe correlation path for the follow-up Responses request.

An OpenAI Responses call can return an mcp_approval_request item instead of running a protected MCP tool. That item carries an ID, a server label, a tool name, and serialized arguments. The user sees a consent card a moment later. If the application trusts an item because it looks roughly right, the approval screen becomes an untyped input parser attached to an action. I want a validation gate before the card appears and another correlation check before the decision goes back to OpenAI.
TL;DR
- Accept only an output item whose type and ID, server label, tool name, and arguments pass the route's current MCP policy.
- Bind the displayed approval card to the exact Response ID and approval-request ID returned by OpenAI.
- Parse arguments under the selected tool schema and show the user the consequential fields before collecting a decision.
- Treat malformed and unknown requests as denied workflow states. Do the same for duplicated or expired requests and for requests that were previously decided.
The approval item is a typed security object
OpenAI's MCP guide documents the approval item with five relevant fields: id and type, arguments, name, and server_label. The type value is mcp_approval_request. The arguments arrive as a serialized JSON string in the documented example, which leaves parsing and application presentation in your hands.
Start with the response envelope. Require the expected provider route and a recognized Response ID, then dispatch each output item by type. For an approval request, require a non-empty provider item ID with the expected prefix shape, an exact registered server label, a tool name permitted on that route, and arguments that parse once under the registered tool schema.
Prefix checks alone provide no authorization. They catch malformed integration data and routing mistakes. The authorization decision comes from the route policy and authenticated application context. Keep those jobs separate in the validator and in its record.
This extends the typed output validation pattern into a user-facing decision point.
Route policy should select the server and tool
A valid server label from OpenAI can still be wrong for the application route. A customer-support route may register crm_read and permit find_customer, while a finance route registers a different label and tool set. The validator should resolve the server label and tool name against the policy version attached to the initiating request.
Use exact identifiers because case folding, whitespace trimming, aliases, and prefix matching make policy review harder when the displayed string differs from the configured owner. Unknown labels and tools should stop at the validation layer. An approval prompt for an unregistered tool asks the user to compensate for missing application policy.
The validator also needs cardinality rules. OpenAI notes that models can make multiple MCP calls, so one Response may produce several approval requests. Give each item a separate card and decision record. Avoid a single "approve all" control unless the route contract explicitly defines a bounded batch and shows every tool and argument set.
Per-route AI policies provide the right owner for these accepted labels and tools, along with the batch limits.
Arguments need schema and meaning checks
Parse the arguments string as JSON and reject duplicate or trailing content in the parser you choose. Then validate the resulting value against the schema registered for the exact tool. Schema validity catches a missing customer ID or an unexpected property. It also catches a string where an integer belongs. Policy still has to inspect consequential values.
A tool named send_invoice may be registered, yet an amount above the route limit or a recipient outside the tenant deserves denial. A read tool can request a protected record. Those are application recommendations, not behavior OpenAI promises to enforce. OpenAI creates the approval item; your route decides which values qualify for display and approval.
Put the server, action, target, and material argument values on the card in plain text. A gray card that says only "Allow tool?" hides the decision the user is supposed to make. Escape every displayed value and cap its rendered length so tool arguments never become markup or a screen-filling consent trap.
Correlation prevents stale and substituted decisions
OpenAI's approval flow sends the decision in a new Responses request as an mcp_approval_response. The item includes approve and approval_request_id; the documented pattern also supplies previous_response_id to chain the new request to the Response that created the approval request.
Store that pair when validation succeeds. The UI should submit an opaque application decision token that resolves to the provider Response and approval-request IDs, authenticated user, route and policy version, and a digest of the displayed server, tool, and arguments. On submission, compare the current user and digest to the stored record before constructing the provider request.
Mark the record decided atomically. A second click or browser replay then receives the stored outcome instead of creating another approval response. A delayed job receives the same outcome. Set an application expiry suited to the action. OpenAI documents each approval as applying to one tool call; your expiry and replay handling are local workflow policy.
Denial is a complete workflow outcome
A negative decision should use the same correlation path as an approval. Send approve: false only after the item and decision token pass validation. Record who denied it, when, under which policy version, and which exact request was shown. Do not silently drop the pending item, because the caller then sees an unexplained stalled Response.
Malformed items need a different outcome label from user denials. A user chose "deny" for a valid request. A parser rejection means the application refused to present an invalid or unsupported request. Provider errors and expired decisions deserve their own codes. Duplicate submissions do as well. That separation keeps operations dashboards honest.
I would reject any design that lets the browser post a raw approval_request_id and boolean directly to the provider adapter. The browser should choose an application-owned pending decision. Server-side code should reconstruct the OpenAI input after every binding check passes.
Evidence for the approval boundary
Keep one compact record for the routed model exchange and one for the human decision. Useful fields include the authenticated identity supplied by the application, route, OpenAI Response ID, approval-request ID, server label, tool name, argument digest, policy version, validator result, display timestamp, decision timestamp, and outcome.
Sensitive argument values may belong in a separately controlled store or may require redaction. A digest supports equality checks without copying a customer record into every event. Retain enough normalized detail to explain what the user saw. The AI audit log schema can carry the correlation fields while payload retention follows the route's data policy.
Test with a correct item, unknown type, bad ID, unknown label, forbidden tool, malformed JSON, schema mismatch, repeated ID, expired decision, changed authenticated user, and altered argument digest. Add a Response containing two approval requests. Confirm that one decision cannot satisfy the other.
DeepInspect
DeepInspect can validate approval items on authenticated user or agent traffic deliberately routed through its HTTP proxy to OpenAI. The route policy can check the response item type, server label, tool name, and argument shape before the application receives an approval request. It can also record the policy decision beside the routed Response ID.
The application still owns the approval interface, authenticated user session, decision expiry, replay protection, and construction of the follow-up Responses request. Remote MCP execution and the server's own authorization remain outside this model-exchange boundary. DeepInspect covers the routed OpenAI request and response where the approval object appears.
Book a demo today.
Frequently asked questions
- Is the approval-request ID enough to validate a decision?
No. Treat it as provider correlation data. Bind it to the originating Response ID and authenticated application user, the route and server label, the tool name and argument digest, and the policy version. The complete binding detects stale and cross-user submissions. It also detects substituted submissions before the application creates an
mcp_approval_response.- Should the browser receive the raw OpenAI approval item?
The browser can receive a sanitized presentation object. Keep provider credentials and raw headers out of it. Keep server-side policy state out of it as well. An application-owned opaque token should identify the pending decision, while the server retains the provider IDs and exact normalized fields used for correlation.
- Can one approval cover several MCP calls?
OpenAI documents each approval as applying to one tool call. When a Response contains several
mcp_approval_requestitems, validate and decide each item separately. A local batch UI may group them visually, but the backend should preserve one decision and one provider approval response per request ID.- What should happen when arguments fail validation?
Withhold the approval prompt and record a validator rejection. Then return a stable application error. A user cannot make an informed decision about arguments the application cannot parse or map to the registered tool schema.