Getting started Community Training Tutorials Documentation APIs, AI & Tools
Validate Tool Schema
Policy Name |
MCP Schema Validation |
Summary |
Validates MCP requests to ensure they conform to the MCP specification |
Category |
MCP |
First Omni Gateway version available |
v1.9.3 |
Release Notes |
|
Returned Status Codes |
| This policy supports Model Context Protocol (MCP) version 2025-06-18 and earlier. To learn more about MCP, see MCP Specification. |
The MCP Schema Validation policy validates that every incoming request complies with JsonRPC MCP protocol.
When Validate Tool Schema is enabled, the policy also:
Validates tool invocation request parameters against the JSON schema of the tool.
Returns the tools/list MCP request without having to send the request to the upstream MCP Server.
When the policy can’t validate the request, it returns an MCP Error Response.
When you apply the policy from the UI, the following parameters are displayed:
| Parameter | Description |
|---|---|
Validate Tool Schema |
When enabled, the policy:
|
Tool Poisoning Detection |
Detects tool-poisoning attacks against MCP |
Configure Tool Poisoning Detection to detect three types of tool-poisoning findings. Each detection type is disabled by default.
For each detection type, configure an Action that determines how the policy handles the response when it finds a poisoning attempt:
LogOnly: Records the finding and leaves the response unchanged.
RemoveTool: Removes only the affected tool from the response.
BlockResponse: Replaces the entire tools/list response with a JSON-RPC error.
| Parameter | Description | Default |
|---|---|---|
Descriptor Drift Detection |
Detects when a pinned tool’s name, description, input schema, output schema, or annotations no longer match the pinned Exchange descriptor (a "rug pull"). This is the highest-confidence finding type. Configure Enabled to activate detection and Action to set the response handling. |
Disabled |
Shadow Tool Name Detection |
Detects tools that are present at runtime but absent from the pin, and flags those whose name is a near-twin of a pinned tool’s name as shadowing. Configure Enabled to activate detection and Action to set the response handling. Configure Max Edit Distance to set the maximum Levenshtein distance from a pinned tool name for an unpinned tool to be flagged as shadowing rather than merely unpinned. A value of |
Disabled, Max Edit Distance |
Prompt Injection Detection |
Scans tool descriptor text fields for prompt-injection heuristics. Disabled by default because it is the lowest-confidence, highest-false-positive-risk finding type. Configure Enabled to activate detection and Action to set the response handling. |
Disabled |
Max Tools Per Response |
Sets the upper bound on how many tools in a single |
|
The MCP Schema Validation policy handles requests and responses differently:
Requests: The policy buffers the full request body.
Responses: The policy processes responses only when at least one Tool Poisoning Detection type (descriptor drift, shadow tool name, or prompt injection) is enabled. Detection is inactive when Validate Tool Schema is enabled and the API is bound to an Anypoint Exchange asset. When the policy processes responses, it buffers the full body of JSON responses and processes SSE (text/event-stream) responses one event at a time without buffering the full stream. Otherwise, responses pass through.
If you enable a Tool Poisoning Detection type and the API isn’t bound to an Anypoint Exchange asset, such as in Local Mode, the policy replaces every tools/list response with a JSON-RPC error (code -32603).
Buffered payloads count toward the Omni Gateway payload limit, which is 1 MB by default. To change the limit on a self-managed Omni Gateway, set the FLEX_DOWNSTREAM_CONNECTION_BUFFER_LIMIT_BYTES environment variable. In Connected Mode, you can also set Global connection buffer limit in Runtime Manager. For more information, see Configure Global and Routing Settings in Runtime Manager. For more information about the limit, see Omni Gateway Limits and Performance Metrics.