get_pricing
Retrieve verified pricing breakdowns for any tool, including all plans, prices, and token pricing.
Instructions
Retrieve complete verified pricing breakdown for a specific tool, including all plans, prices, highlights, and token pricing where applicable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Tool slug identifier |
Implementation Reference
- index.js:378-414 (handler)The getPricing function that executes the tool logic. It fetches pricing data for a given tool slug, returns free plan info, plans with prices and highlights, token pricing (if applicable), and a ComparEdge URL.
async function getPricing(args) { const { slug } = args; const allPricing = await getAllPricing(); const entry = allPricing.find(t => t.slug === slug); if (!entry) return `Pricing data not found for "${slug}".`; const lines = [ `Pricing: ${entry.name || slug}`, `Free plan: ${entry.freePlan ? 'Yes' : 'No'}`, `Verified at: ${entry.verifiedAt || 'N/A'}`, ]; if (entry.plans && entry.plans.length > 0) { lines.push('\nPlans:'); entry.plans.forEach(p => { const price = p.price !== undefined ? formatPrice(p.price) : 'N/A'; lines.push(` ${p.name}: ${price}`); if (p.highlights && p.highlights.length > 0) { const h = Array.isArray(p.highlights) ? p.highlights : [p.highlights]; h.forEach(hl => lines.push(` - ${hl}`)); } }); } if (entry.tokenPricing) { lines.push('\nToken pricing:'); if (typeof entry.tokenPricing === 'object') { Object.entries(entry.tokenPricing).forEach(([k, v]) => lines.push(` ${k}: ${v}`)); } else { lines.push(` ${entry.tokenPricing}`); } } lines.push(`\nComparEdge URL: ${pricingURL(slug)}`); return lines.join('\n'); } - index.js:129-139 (schema)Input schema definition for the 'get_pricing' tool, specifying it accepts a required 'slug' string parameter.
{ name: 'get_pricing', description: 'Retrieve complete verified pricing breakdown for a specific tool, including all plans, prices, highlights, and token pricing where applicable.', inputSchema: { type: 'object', properties: { slug: { type: 'string', description: 'Tool slug identifier' }, }, required: ['slug'], }, }, - index.js:455-455 (registration)Dispatch routing: case 'get_pricing' maps to the getPricing(args) function in the callTool switch statement.
case 'get_pricing': return getPricing(args); - index.js:189-191 (helper)Helper function pricingURL(slug) used by the getPricing handler to generate the full ComparEdge pricing URL.
function pricingURL(slug) { return `${SITE_BASE}/pricing/${slug}-pricing`; } - index.js:193-197 (helper)Helper function formatPrice(price) used by getPricing to format pricing values as '$X/mo' or 'Free'.
function formatPrice(price) { if (price === null || price === undefined) return 'N/A'; if (price === 0) return 'Free'; return `$${price}/mo`; }