MCP Server Generator
Free tool ยท Runs in your browser

MCP Tool Schema Generator

Design the tools of an MCP server in a form and get the exact JSON a client sees in tools/list: name, title, description, an inputSchema with typed properties and a required list, and optional annotations. The same definition is written as TypeScript (Zod) or Python (mcp) code, or downloaded as a runnable project. Paste an existing definition to validate it. Everything runs in your browser.

Build MCP tool definitions

Tools


      

Validate an MCP tool definition

    What an MCP tool definition contains

    • name: the identifier the model calls. Keep it short, unique within the server and limited to letters, digits, _, - and ..
    • title (optional): a human-readable label that hosts may show in their UI.
    • description: the most important field. The model reads it to decide when to call the tool, so say what it does, what it returns and when to use it.
    • inputSchema: a JSON Schema object. Each property has a type and a description; required ones are listed in required. A tool with no arguments still needs {"type": "object", "properties": {}}.
    • annotations (optional): behaviour hints such as readOnlyHint and destructiveHint.

    Type mapping

    Builder typeJSON SchemaTypeScript (Zod)Python
    string{"type": "string"}z.string()str
    number{"type": "number"}z.number()float
    integer{"type": "integer"}z.number().int()int
    boolean{"type": "boolean"}z.boolean()bool
    enum{"type": "string", "enum": [...]}z.enum([...])Literal[...]
    array of strings{"type": "array", "items": {"type": "string"}}z.array(z.string())list[str]
    array of numbers{"type": "array", "items": {"type": "number"}}z.array(z.number())list[float]

    Optional parameters get .optional() in Zod and | None = None in Python, and are left out of required. Parameter names that clash with Python or JavaScript keywords, such as class, get a trailing underscore so both languages accept them.

    Checked against the real SDKs

    On 2026-10-19 we built a tool with every type above plus annotations, downloaded both projects, and ran them: @modelcontextprotocol/sdk 1.32.1 on Node 20 and mcp 2.3.0 on Python 3.13. An MCP client listed the tools from each server. Every name, title, description, annotation, property type, enum, array item type and required list matched the JSON this page shows. A call with an enum value outside the list came back as an error, as it should.

    The SDKs add a few fields of their own. TypeScript adds "additionalProperties": false and a $schema line. Python adds a title to every property, writes optional parameters as anyOf with null, and adds an outputSchema for the str return value.

    Ready to run these tools?

    Download a ZIP above, or use the main generator for a quick string, number and boolean server. Then add it to your host with the config generator.

    FAQ

    What is an MCP tool schema?

    It is the inputSchema of a tool: a JSON Schema object with "type": "object", a properties map and a required list. The server returns it in tools/list, the host passes it to the model, and the model uses it to build the arguments of each call.

    How do I mark a parameter as required in an MCP tool?

    List its name in the required array of the inputSchema, next to properties. Writing "required": true inside the property itself is an older JSON Schema habit that MCP clients ignore; the validator flags it.

    Is inputSchema the same as OpenAI parameters or Anthropic input_schema?

    The JSON Schema inside is the same idea, but the key differs: OpenAI function calling uses parameters, the Anthropic API uses input_schema, and MCP uses inputSchema. Paste a definition from either API into the validator and it tells you which key to rename; Load into builder converts the properties.

    What are MCP tool annotations?

    Optional hints about behaviour: readOnlyHint, destructiveHint, idempotentHint and openWorldHint. Hosts can use them to decide when to ask for confirmation. They are hints from the server, so clients should not treat them as a security guarantee.

    Which characters can an MCP tool name use?

    The MCP specification recommends 1 to 128 characters from A-Z, a-z, 0-9, underscore, hyphen and dot, with names unique within a server. The builder keeps hyphens and dots in the tool name and derives a valid Python function name separately.

    Why does the Python SDK show anyOf and title in the schema?

    Pydantic writes an optional int | None parameter as anyOf integer or null with a default of null, and adds a title to each property. The TypeScript SDK adds additionalProperties: false and a $schema line. Both are valid JSON Schema and models handle them; the builder shows the minimal form.