get-tool-help
Retrieve detailed usage information and parameters for specific MCP Firebird database tools to understand their functionality and proper implementation.
Instructions
Obtiene información detallada sobre una herramienta específica
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toolName | Yes | Nombre de la herramienta sobre la que obtener ayuda |
Implementation Reference
- src/tools/metadata.ts:136-176 (handler)The async handler function that implements the logic for the 'get-tool-help' tool. It retrieves detailed information about the specified tool from available database and metadata tools, formats it nicely, and returns it in the expected MCP response format.handler: async (args: { toolName: string }) => { try { const allTools = new Map([...databaseTools, ...tools]); const tool = allTools.get(args.toolName); if (!tool) { return { content: [{ type: 'text', text: `Herramienta '${args.toolName}' no encontrada. Use 'list-available-tools' para ver las herramientas disponibles.` }], isError: true }; } const helpInfo = { name: args.toolName, title: tool.title || args.toolName, description: tool.description, category: databaseTools.has(args.toolName) ? 'database' : 'metadata', inputSchema: tool.inputSchema ? 'Disponible' : 'No definido', usage: `Para usar esta herramienta, llame a '${args.toolName}' con los parámetros apropiados.` }; return { content: [{ type: 'text', text: `Ayuda para la herramienta: ${args.toolName}\n\n${formatForClaude(helpInfo)}` }] }; } catch (error) { logger.error('Error getting tool help:', { error }); return { content: [{ type: 'text', text: `Error obteniendo ayuda: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } }
- src/tools/metadata.ts:133-135 (schema)The Zod input schema for the 'get-tool-help' tool, requiring a 'toolName' string parameter.inputSchema: z.object({ toolName: z.string().describe('Nombre de la herramienta sobre la que obtener ayuda') }),
- src/tools/metadata.ts:130-177 (registration)The registration of the 'get-tool-help' tool within the setupMetadataTools function, adding it to the metadata tools Map.tools.set('get-tool-help', { title: 'Get Tool Help', description: 'Obtiene información detallada sobre una herramienta específica', inputSchema: z.object({ toolName: z.string().describe('Nombre de la herramienta sobre la que obtener ayuda') }), handler: async (args: { toolName: string }) => { try { const allTools = new Map([...databaseTools, ...tools]); const tool = allTools.get(args.toolName); if (!tool) { return { content: [{ type: 'text', text: `Herramienta '${args.toolName}' no encontrada. Use 'list-available-tools' para ver las herramientas disponibles.` }], isError: true }; } const helpInfo = { name: args.toolName, title: tool.title || args.toolName, description: tool.description, category: databaseTools.has(args.toolName) ? 'database' : 'metadata', inputSchema: tool.inputSchema ? 'Disponible' : 'No definido', usage: `Para usar esta herramienta, llame a '${args.toolName}' con los parámetros apropiados.` }; return { content: [{ type: 'text', text: `Ayuda para la herramienta: ${args.toolName}\n\n${formatForClaude(helpInfo)}` }] }; } catch (error) { logger.error('Error getting tool help:', { error }); return { content: [{ type: 'text', text: `Error obteniendo ayuda: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } });