API-get-input-schema
Retrieve the required input structure for any RSS3 API tool to ensure proper data formatting before making API calls.
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
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toolName | No | The name of the tool to get the input schema for |
Implementation Reference
- index.js:156-175 (handler)Handler function for the 'API-get-input-schema' tool. It iterates through the MCP tools derived from OpenAPI specs, matches the provided toolName (truncated), and returns the inputSchema of the matching method as JSON text content.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:129-142 (registration)Registers the 'API-get-input-schema' tool in the listTools response by unshifting it to the tools array, providing its name, description, and inputSchema.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:133-141 (schema)Input schema definition for the 'API-get-input-schema' tool, specifying a 'toolName' string property.inputSchema: { type: "object", properties: { toolName: { type: "string", description: "The name of the tool to get the input schema for", }, }, },