protocolTechArticle
MCP Tool Schemas
Design MCP tools with clear JSON schemas, safe arguments, validation, and user approval boundaries.
Quick Answer / TL;DR
MCP tools are executable functions exposed to AI clients. Good tools have short descriptions, shallow JSON schemas, strict validation, and clear safety boundaries.
Key Takeaways
- Tools do actions.
- Schemas should be shallow.
- High-risk tools need explicit approval.
Tool design rules
A tool should map to one business action, not an entire application. Narrow tools are easier for models to select and safer for humans to approve.
Use enums, bounded strings, and explicit required fields. Avoid free-form command fields unless the server has a strong sandbox.
{
"name": "lookup_ifsc",
"description": "Find Indian bank branch details from an IFSC code.",
"inputSchema": {
"type": "object",
"required": ["ifsc"],
"properties": {
"ifsc": { "type": "string", "pattern": "^[A-Z]{4}0[A-Z0-9]{6}$" }
}
}
}MCP Tool Schemas FAQs
Direct answers for developers, operators, and Indian teams evaluating MCP.