MCP describes a tool’s expected input schema using structured JSON Schema definitions attached directly to each tool definition. When a tool is registered on an MCP server, the developer provides a JSON Schema that outlines exactly what inputs the tool accepts, including field names, data types, required properties, allowed ranges, and nested structures. This schema becomes part of the metadata the server sends to the MCP client during initialization. Because JSON Schema is both human-readable and machine-validated, the model can reliably construct requests that match the expected shape.
In practice, the input schema helps prevent malformed or ambiguous tool calls. For example, if a tool expects a vector array, the schema might specify "type": "array", "items": { "type": "number" }, along with a description of the required dimensionality. Similarly, if the tool expects optional metadata such as filters or parameters, the schema can reflect that with "required" fields and "properties" definitions. MCP clients use this schema to build correct request messages and avoid errors that would otherwise occur through trial-and-error or natural language guessing.
For vector databases like Milvus, input schemas are especially useful because vector search operations require precise structural inputs. A search tool might include fields such as "embedding", "top_k", and "collection", all validated through the schema. If the model sends an embedding with the wrong number of dimensions, the MCP server can reject it before performing the search. This strictness keeps vector pipelines safe and predictable, ensuring that tools operate on valid data and that search accuracy is not compromised by inconsistent inputs.
