get_tool
Retrieve detailed information about specific running tools, including FAQs and related tools, for pace calculations, race predictions, and heart rate training.
Instructions
Get detailed information about a specific running tool including FAQs and related tools
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Tool slug, e.g. "pace-calculator", "heart-rate-zones" |
Implementation Reference
- index.js:134-150 (handler)The implementation of the get_tool MCP tool. It fetches data from a remote API based on the provided slug and returns a formatted string with tool details.
// Tool: get_tool server.tool( 'get_tool', 'Get detailed information about a specific running tool including FAQs and related tools', { slug: z.string().describe('Tool slug, e.g. "pace-calculator", "heart-rate-zones"') }, async ({ slug }) => { const data = await fetchJSON(`${BASE_URL}/api/tools/${slug}.json`); const t = data.tool; let text = `## ${t.title}\n\n${t.description}\n\nURL: ${t.url}\nCategory: ${t.category}\n`; if (t.relatedTools.length) text += `\nRelated tools: ${t.relatedTools.join(', ')}`; if (t.faqs.length) { text += '\n\n### FAQs\n'; t.faqs.forEach(f => { text += `\n**Q: ${f.question}**\nA: ${f.answer}\n`; }); } return { content: [{ type: 'text', text }] }; } );