API-get-input-schema
Retrieve the input schema for any API tool within the RSS3 MCP Server before making a call to ensure correct parameters.
Instructions
Get the input schema for a given API. We should always use this tool to get the input schema for a given API before calling the API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toolName | No | The name of the tool to get the input schema for |
Implementation Reference
- index.js:129-142 (registration)Registers the 'API-get-input-schema' tool in the list of tools returned by ListToolsRequestSchema handler. Adds it as the first (unshifted) tool with a single required input 'toolName'.
tools.unshift({ name: "API-get-input-schema", description: "Get the input schema for a given API. We should always use this tool to get the input schema for a given API before calling the API.", inputSchema: { type: "object", properties: { toolName: { type: "string", description: "The name of the tool to get the input schema for", }, }, }, }); - index.js:156-175 (handler)Handles the 'API-get-input-schema' tool call. Iterates over all MCP tools to find the one matching params.toolName, then returns its inputSchema as JSON text.
if (name === "API-get-input-schema") { for (const mcpToolWithClient of mcpToolWithClients) { for (const [toolName, def] of Object.entries( mcpToolWithClient.mcpTools.tools, )) { for (const method of def.methods) { const toolNameWithMethod = `${toolName}-${method.name}`; const truncatedToolName = toolNameWithMethod.slice(0, 64); if (truncatedToolName === params.toolName) { return { content: [ { type: "text", text: JSON.stringify(method.inputSchema) }, ], }; } } } } throw new Error(`Method ${params.toolName} not found`); } - index.js:133-141 (schema)Input schema for the 'API-get-input-schema' tool, defining a single 'toolName' string property.
inputSchema: { type: "object", properties: { toolName: { type: "string", description: "The name of the tool to get the input schema for", }, }, },