tools_schema
Retrieves the JSON schema for a specified tool, providing the required column mapping and module parameters needed before execution.
Instructions
Get JSON schema for a tool — column_mapping and module_parameters required before tools_run.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool_name | Yes | Name of the tool |
Implementation Reference
- src/index.js:46-46 (registration)The tool 'tools_schema' is registered in the STATIC_TOOLS array as a static tool catalog entry used for inspection/fallback. It has an inputSchema requiring a 'tool_name' string property.
{ name: "tools_schema", description: "Get JSON schema for a tool — column_mapping and module_parameters required before tools_run.", inputSchema: { type: "object", properties: { tool_name: { type: "string", description: "Name of the tool" } }, required: ["tool_name"] } }, - src/index.js:121-146 (handler)The CallToolRequestSchema handler proxies all tool call requests (including tools_schema) to the remote MCP server via remoteClient.callTool().
server.setRequestHandler(CallToolRequestSchema, async (request) => { if (!remoteClient) { return { content: [ { type: "text", text: "MCP Analytics API key required. Set MCP_ANALYTICS_API_KEY in your environment.\nGet a free key at https://app.mcpanalytics.ai", }, ], isError: true, }; } try { const result = await remoteClient.callTool({ name: request.params.name, arguments: request.params.arguments || {}, }); return result; } catch (err) { return { content: [{ type: "text", text: `Error: ${err.message}` }], isError: true, }; } }); - src/index.js:70-103 (helper)When an API key is present, a remote client connects to the MCP API and fetches the live tool catalog (which includes tools_schema handler logic from the server side).
if (API_KEY) { try { const transport = new StreamableHTTPClientTransport( new URL(`${API_URL}/mcp/api-key`), { requestInit: { headers: { "X-API-Key": API_KEY } } } ); remoteClient = new Client({ name: "mcp-analytics-proxy", version: "1.0.0", }); await remoteClient.connect(transport); // Fetch live tool catalog const liveTools = []; let cursor; do { const { tools, nextCursor } = await remoteClient.listTools({ cursor }); liveTools.push(...tools); cursor = nextCursor; } while (cursor); toolCatalog = liveTools; process.stderr.write( `[mcp-analytics] Connected to ${API_URL}. ${toolCatalog.length} tools available.\n` ); } catch (err) { process.stderr.write( `[mcp-analytics] Could not connect to remote (${err.message}). Using static catalog (${STATIC_TOOLS.length} tools).\n` ); remoteClient = null; } } else { - src/index.js:46-46 (schema)Input schema for tools_schema: requires a 'tool_name' (string) property. The tool returns the JSON schema for the specified analysis tool's column_mapping and module_parameters.
{ name: "tools_schema", description: "Get JSON schema for a tool — column_mapping and module_parameters required before tools_run.", inputSchema: { type: "object", properties: { tool_name: { type: "string", description: "Name of the tool" } }, required: ["tool_name"] } },