Tool Schema Design

Designs JSON Schemas for LLM tool/function calling that survive across providers. Use when writing tool definitions, function-calling `parameters`, an MCP tool `inputSchema`, or zod/Pydantic tool schemas; when deciding between anyOf/oneOf/allOf; when choosing format/enum/description usage; or when one schema must run on several providers or strict modes (OpenAI, Anthropic, Gemini, Vertex, Bedrock, Cohere, xAI, DeepSeek, Fireworks, FriendliAI, vLLM/SGLang, and more). Covers the canonical-schema + adapter architecture, the hard rules (root object, no oneOf/allOf, nested anyOf allowed, no $ref/default/constraint keywords in the canonical schema), strict-mode transforms, the authoring guide for names, descriptions, and errors (what to write, what style, how long), and tool-design practices beyond the schema (naming, tool count, consolidation, output and error design, evals).

minpeter Updated

File contents

minpeter/minpeter-skills/tree/main/skills/tool-schema-design commit 6a6b51fdb9

Frequently asked questions

npx skillmds@latest add minpeter/tool-schema-design