get-tool-help
Retrieve detailed information about a specific tool within the MCP Firebird server, enabling users to understand its functionality and usage.
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)Handler function for the 'get-tool-help' tool. It retrieves detailed information about a specified tool by looking it up in the available tools map, formats the help info, and returns it as a text response. Handles cases where the tool is not found or errors occur.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)Input schema for 'get-tool-help' tool using Zod. Requires 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)Registration of the 'get-tool-help' tool in the metadata tools map within setupMetadataTools function.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 }; } } });