get_tool
Get full details for a software tool by slug, including name, description, category, rating, pricing, features, and URL.
Instructions
Retrieve full details for a specific software tool by its slug. Returns name, description, category, rating, all pricing plans, features, and ComparEdge URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Tool slug identifier (e.g., "openai", "notion", "github-copilot") |
Implementation Reference
- index.js:81-91 (registration)Registration of the 'get_tool' tool in the TOOL_DEFINITIONS array with its name, description, and inputSchema (slug required).
{ name: 'get_tool', description: 'Retrieve full details for a specific software tool by its slug. Returns name, description, category, rating, all pricing plans, features, and ComparEdge URL.', inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Tool slug identifier (e.g., "openai", "notion", "github-copilot")' }, }, required: ['slug'], }, }, - index.js:252-290 (handler)Handler function that retrieves full details for a specific software tool by its slug. Fetches tools and pricing data, looks up the tool by slug, and formats a response with name, description, category, rating, free plan, pricing plans, features, and URLs.
async function getTool(args) { const { slug } = args; const [allTools, allPricing] = await Promise.all([getAllTools(), getAllPricing()]); const t = allTools.find(x => x.slug === slug); if (!t) return `Tool with slug "${slug}" not found. Use search_tools to find the correct slug.`; const pricing = allPricing.find(x => x.slug === slug); const lines = [ `Name: ${t.name}`, `Slug: ${t.slug}`, `Category: ${t.categoryName || t.category || 'N/A'}`, `Description: ${t.description || 'N/A'}`, `Rating: ${t.rating ? `${t.rating}/5` : 'N/A'}`, `Free plan: ${t.freePlan ? 'Yes' : 'No'}`, `Starting price: ${t.startingPrice !== undefined ? formatPrice(t.startingPrice) : 'N/A'}`, `Verified at: ${t.verifiedAt || t.lastUpdated || 'N/A'}`, ]; const plans = pricing?.plans || t.plans; if (plans && plans.length > 0) { lines.push('\nPricing plans:'); plans.forEach(p => { const price = p.price !== undefined ? formatPrice(p.price) : 'N/A'; const hl = Array.isArray(p.highlights) ? p.highlights.slice(0, 3).join(', ') : ''; lines.push(` - ${p.name}: ${price}${hl ? ` | ${hl}` : ''}`); }); } if (t.features && t.features.length > 0) { lines.push('\nKey features:'); t.features.slice(0, 10).forEach(f => lines.push(` - ${f}`)); } lines.push(`\nComparEdge URL: ${toolURL(slug)}`); lines.push(`Pricing details: ${pricingURL(slug)}`); return lines.join('\n'); } - index.js:448-460 (registration)Dispatch switch-case that routes the 'get_tool' tool call to the getTool function.
async function callTool(name, args) { switch (name) { case 'search_tools': return searchTools(args); case 'get_tool': return getTool(args); case 'compare_tools': return compareTools(args); case 'list_category': return listCategory(args); case 'get_alternatives':return getAlternatives(args); case 'get_pricing': return getPricing(args); case 'get_leaderboard': return getLeaderboard(args); case 'list_categories': return listCategoriesFn(); default: throw new Error(`Unknown tool: ${name}`); } } - index.js:193-197 (helper)Helper function to format prices used by getTool.
function formatPrice(price) { if (price === null || price === undefined) return 'N/A'; if (price === 0) return 'Free'; return `$${price}/mo`; } - index.js:185-191 (helper)Helper functions to generate tool and pricing URLs used by getTool.
function toolURL(slug) { return `${SITE_BASE}/tools/${slug}`; } function pricingURL(slug) { return `${SITE_BASE}/pricing/${slug}-pricing`; }