Skip to main content
Glama
imviky-ctrl

Tickerr — Live AI Tool Status & API Pricing

compare_pricing

Find the cheapest AI model for your workload by comparing costs based on input and output tokens. Filter by provider or model family, and rank results to identify the lowest price.

Instructions

Rank AI models by total cost for a given token workload. Useful for finding the cheapest model for your use case.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_tokensYesNumber of input tokens per request
output_tokensNoNumber of output tokens per request
filterNoNarrow to a provider or model family — e.g. "claude", "gpt", "gemini"
topNoShow only the N cheapest models (default 10)

Implementation Reference

  • src/index.ts:228-281 (registration)
    Registration of the 'compare_pricing' tool via server.tool() with name 'compare_pricing' and description 'Rank AI models by total cost for a given token workload.'
    server.tool(
      'compare_pricing',
      'Rank AI models by total cost for a given token workload. Useful for finding the cheapest model for your use case.',
      {
        input_tokens: z.number().int().min(1).describe('Number of input tokens per request'),
        output_tokens: z.number().int().min(0).default(0).describe('Number of output tokens per request'),
        filter: z.string().optional().describe('Narrow to a provider or model family — e.g. "claude", "gpt", "gemini"'),
        top: z.number().int().min(1).max(30).optional().describe('Show only the N cheapest models (default 10)'),
      },
      async ({ input_tokens, output_tokens, filter, top = 10 }) => {
        const data = await fetchJSON<{ models: PricingRow[] }>('/pricing')
        let models = data.models
        if (filter) {
          const q = filter.toLowerCase()
          models = models.filter(
            (m) => m.model_name.toLowerCase().includes(q) || m.tool_name.toLowerCase().includes(q)
          )
        }
    
        const ranked = models
          .map((m) => ({
            ...m,
            total: (input_tokens / 1_000_000) * m.input_per_1m + (m.output_per_1m !== null ? (output_tokens / 1_000_000) * m.output_per_1m : 0),
          }))
          .sort((a, b) => a.total - b.total)
          .slice(0, top)
    
        if (!ranked.length) {
          return { content: [{ type: 'text' as const, text: 'No models found for that filter.' }] }
        }
    
        const cheapest = ranked[0].total
        const fmt = (n: number) => n < 0.001 ? `$${n.toFixed(6)}` : `$${n.toFixed(4)}`
        const col = (s: string, w: number) => s.length > w ? s.slice(0, w - 1) + '…' : s.padEnd(w)
    
        const header = `${'#'.padStart(2)}  ${col('Model', 36)} ${col('Tool', 18)} ${'Cost'.padStart(10)}  vs cheapest`
        const sep = '─'.repeat(header.length)
        const rows = ranked.map((m, i) => {
          const mult = i === 0 ? '(cheapest)' : `${(m.total / cheapest).toFixed(1)}× more`
          return `${String(i + 1).padStart(2)}  ${col(m.model_name, 36)} ${col(m.tool_name, 18)} ${fmt(m.total).padStart(10)}  ${mult}`
        })
    
        return {
          content: [{
            type: 'text' as const,
            text: [
              `Cost for ${input_tokens.toLocaleString()} input + ${output_tokens.toLocaleString()} output tokens:`,
              '', header, sep, ...rows, '',
              'Full calculator: https://tickerr.ai/token-counter',
            ].join('\n'),
          }],
        }
      }
    )
  • Input schema for compare_pricing: input_tokens (required int), output_tokens (default 0), filter (optional string), top (optional int, default 10).
    {
      input_tokens: z.number().int().min(1).describe('Number of input tokens per request'),
      output_tokens: z.number().int().min(0).default(0).describe('Number of output tokens per request'),
      filter: z.string().optional().describe('Narrow to a provider or model family — e.g. "claude", "gpt", "gemini"'),
      top: z.number().int().min(1).max(30).optional().describe('Show only the N cheapest models (default 10)'),
    },
  • Handler function that fetches /pricing, filters models by optional filter string, calculates total cost per model based on input/output tokens, sorts by cheapest, and returns a ranked table of the top N models.
    async ({ input_tokens, output_tokens, filter, top = 10 }) => {
      const data = await fetchJSON<{ models: PricingRow[] }>('/pricing')
      let models = data.models
      if (filter) {
        const q = filter.toLowerCase()
        models = models.filter(
          (m) => m.model_name.toLowerCase().includes(q) || m.tool_name.toLowerCase().includes(q)
        )
      }
    
      const ranked = models
        .map((m) => ({
          ...m,
          total: (input_tokens / 1_000_000) * m.input_per_1m + (m.output_per_1m !== null ? (output_tokens / 1_000_000) * m.output_per_1m : 0),
        }))
        .sort((a, b) => a.total - b.total)
        .slice(0, top)
    
      if (!ranked.length) {
        return { content: [{ type: 'text' as const, text: 'No models found for that filter.' }] }
      }
    
      const cheapest = ranked[0].total
      const fmt = (n: number) => n < 0.001 ? `$${n.toFixed(6)}` : `$${n.toFixed(4)}`
      const col = (s: string, w: number) => s.length > w ? s.slice(0, w - 1) + '…' : s.padEnd(w)
    
      const header = `${'#'.padStart(2)}  ${col('Model', 36)} ${col('Tool', 18)} ${'Cost'.padStart(10)}  vs cheapest`
      const sep = '─'.repeat(header.length)
      const rows = ranked.map((m, i) => {
        const mult = i === 0 ? '(cheapest)' : `${(m.total / cheapest).toFixed(1)}× more`
        return `${String(i + 1).padStart(2)}  ${col(m.model_name, 36)} ${col(m.tool_name, 18)} ${fmt(m.total).padStart(10)}  ${mult}`
      })
    
      return {
        content: [{
          type: 'text' as const,
          text: [
            `Cost for ${input_tokens.toLocaleString()} input + ${output_tokens.toLocaleString()} output tokens:`,
            '', header, sep, ...rows, '',
            'Full calculator: https://tickerr.ai/token-counter',
          ].join('\n'),
        }],
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries full burden. It only states it ranks models by cost but does not disclose how the ranking is computed, what data sources are used, or any side effects. The minimal description leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the main purpose, no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters and no output schema, the description is adequate but lacks information about what the output looks like, how models are sourced, or how the cost calculation works. It is minimally viable but not rich.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond what the schema already provides for the parameters; it merely reiterates the concept of token workload.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool ranks AI models by total cost for a given token workload, which is specific and distinguishes it from sibling tools like get_api_pricing that likely just list prices.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says 'Useful for finding the cheapest model for your use case,' providing clear context for when to use it, but does not mention when not to use it or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/imviky-ctrl/tickerr-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server