Free Developer Tool • In-Browser Playground

MCP Tool Schema Builder & Code Generator

Design Model Context Protocol tool specifications visually, validate schema compliance for Claude, inspect stdio JSON-RPC payloads, and export production-ready TypeScript and Python FastMCP code with zero boilerplate.

Templates:

1. Tool Identity & Description

Used by Claude to call the tool over JSON-RPC. Must be snake_case without spaces.

Crucial for LLM grounding. Ambiguous descriptions cause Claude to skip tools.

2. Input Parameters Schema

Fields the model must construct to invoke this tool

Schema Compliance Check Official MCP Ready

Schema follows JSON Schema 7 and Anthropic Model Context Protocol conventions. Parameters are strictly typed with descriptive text.

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
  CallToolRequestSchema,
  ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";

// 1. Initialize MCP Server instance
const server = new Server(
  {
    name: "fetch_financial_metrics-service",
    version: "1.0.0",
  },
  {
    capabilities: {
      tools: {},
    },
  }
);

// 2. Register Tool Capabilities & Schema
server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [
    {
      name: "fetch_financial_metrics",
      description: "Retrieves quarterly revenue, burn rate, and run-rate ARR for a given company identifier.",
      inputSchema: {
        type: "object",
        properties: {
          "company_id": {
            type: "string",
            description: "Unique organization identifier (e.g. comp_9182)"
          },
          "fiscal_quarter": {
            type: "string",
            description: "Target financial quarter (e.g. 'Q3-2026')"
          },
          "include_audit_trail": {
            type: "boolean",
            description: "Return cryptographic transaction timestamps"
          }
        },
        required: ["company_id"],
      },
    },
  ],
}));

// 3. Execution Handler
server.setRequestHandler(CallToolRequestSchema, async (request) => {
  if (request.params.name === "fetch_financial_metrics") {
    const args = request.params.arguments as {
    company_id: string;
    fiscal_quarter?: string;
    include_audit_trail?: boolean;
    };

    // Perform actual tool work (database query, API call, calculation)
    return {
      content: [
        {
          type: "text",
          text: JSON.stringify({
            status: "success",
            timestamp: new Date().toISOString(),
            output: args,
          }),
        },
      ],
      isError: false,
    };
  }

  throw new Error(`Unknown tool: ${request.params.name}`);
});

// 4. Connect over local stdio transport
const transport = new StdioServerTransport();
await server.connect(transport);
Need Real Database / stdio Debugging?Clardan Desktop

The web sandbox generates valid schema definitions. To connect directly to local PostgreSQL instances, inspect live stdio subprocess pipes with 17ms telemetry, and sync with Claude Desktop automatically, install the Clardan Desktop native application.