get_tool
Retrieve detailed information, frequently asked questions, and related tools for a specific running calculator by providing its slug.
Instructions
Get detailed information about a specific running tool including FAQs and related tools
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Tool slug, e.g. "pace-calculator", "heart-rate-zones" |
Implementation Reference
- index.js:134-150 (handler)The 'get_tool' tool handler: accepts a slug parameter, fetches tool details from the RunDida API, and returns formatted text with description, URL, category, related tools, and FAQs.
// 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 }] }; } ); - index.js:134-136 (registration)Registration of the 'get_tool' tool via server.tool() with the name 'get_tool'.
// Tool: get_tool server.tool( 'get_tool', - index.js:138-138 (schema)The input schema for the 'get_tool' tool: a single required 'slug' field (z.string) with a description.
{ slug: z.string().describe('Tool slug, e.g. "pace-calculator", "heart-rate-zones"') },