Skip to main content
Glama
imviky-ctrl

Tickerr — Live AI Tool Status & API Pricing

get_api_pricing

Fetch current API pricing per million tokens for AI models tracked by tickerr.ai. Filter by model or provider name to get input and output costs for models like GPT-4o, Claude, and Gemini.

Instructions

Get current API pricing (input/output cost per 1M tokens) for AI models tracked by tickerr.ai. Filter by model or provider name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoFilter by model or tool name — e.g. "claude", "gpt-4o", "gemini"
limitNoMax models to return (default 50)

Implementation Reference

  • The PricingRow interface defines the shape of pricing data used by get_api_pricing: tool_slug, tool_name, model_name, model_slug, input_per_1m, output_per_1m, and cached_input_per_1m.
    interface PricingRow {
      tool_slug: string; tool_name: string; model_name: string; model_slug: string
      input_per_1m: number; output_per_1m: number | null; cached_input_per_1m: number | null
    }
  • The main handler for 'get_api_pricing' tool. Fetches pricing data from /pricing endpoint, applies optional filter by model/tool name, limits results, and returns a formatted table with input, output, and cached input costs per 1M tokens.
    server.tool(
      'get_api_pricing',
      'Get current API pricing (input/output cost per 1M tokens) for AI models tracked by tickerr.ai. Filter by model or provider name.',
      {
        filter: z.string().optional().describe('Filter by model or tool name — e.g. "claude", "gpt-4o", "gemini"'),
        limit: z.number().int().min(1).max(200).optional().describe('Max models to return (default 50)'),
      },
      async ({ filter, limit = 50 }) => {
        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.model_slug.toLowerCase().includes(q) || m.tool_name.toLowerCase().includes(q)
          )
        }
        models = models.slice(0, limit)
    
        if (models.length === 0) {
          return { content: [{ type: 'text' as const, text: `No models found${filter ? ` matching "${filter}"` : ''}.` }] }
        }
    
        const fmt = (n: number | null) => n !== null ? `$${n.toFixed(2)}` : 'n/a'
        const col = (s: string, w: number) => s.length > w ? s.slice(0, w - 1) + '…' : s.padEnd(w)
    
        const header = `${col('Model', 38)} ${col('Tool', 18)} ${'In/1M'.padStart(8)} ${'Out/1M'.padStart(8)} ${'Cache/1M'.padStart(9)}`
        const sep = '─'.repeat(header.length)
        const rows = models.map((m) =>
          `${col(m.model_name, 38)} ${col(m.tool_name, 18)} ${fmt(m.input_per_1m).padStart(8)} ${fmt(m.output_per_1m).padStart(8)} ${fmt(m.cached_input_per_1m).padStart(9)}`
        )
    
        return {
          content: [{
            type: 'text' as const,
            text: [
              `${models.length} models (sorted cheapest input first):`,
              '', header, sep, ...rows, '',
              'Full pricing: https://tickerr.ai/pricing',
            ].join('\n'),
          }],
        }
      }
    )
  • src/index.ts:146-152 (registration)
    Registers the 'get_api_pricing' tool in the MCP server using server.tool() with schema validation for optional 'filter' and 'limit' parameters.
    server.tool(
      'get_api_pricing',
      'Get current API pricing (input/output cost per 1M tokens) for AI models tracked by tickerr.ai. Filter by model or provider name.',
      {
        filter: z.string().optional().describe('Filter by model or tool name — e.g. "claude", "gpt-4o", "gemini"'),
        limit: z.number().int().min(1).max(200).optional().describe('Max models to return (default 50)'),
      },
  • The fetchJSON helper function used by get_api_pricing (and all other tools) to make authenticated GET requests to the tickerr.ai API and parse JSON responses.
    async function fetchJSON<T>(path: string): Promise<T> {
      const res = await fetch(`${BASE_URL}${path}`, { headers: { 'User-Agent': UA } })
      if (!res.ok) {
        const text = await res.text().catch(() => '')
        throw new Error(`tickerr API ${res.status}: ${text.slice(0, 200)}`)
      }
      return res.json() as Promise<T>
    }
Behavior2/5

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

With no annotations, the description carries the full burden. It mentions data freshness (current) and cost units, but lacks details on authentication, rate limits, or read-only nature.

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 efficient sentences front-load the key purpose and filtering capability with no unnecessary words.

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

Completeness4/5

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

For a simple two-parameter tool with no output schema, the description adequately covers usage and filtering. Missing output format is a minor gap.

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 does not add new meaning beyond what is already in the schema for filter and limit.

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 retrieves current API pricing for AI models, specifying cost per 1M tokens, and allows filtering by model or provider. This distinctively separates it from siblings like compare_pricing.

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

Usage Guidelines3/5

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

The description implies usage through filter and limit parameters but does not explicitly state when to use this tool versus alternatives like compare_pricing or get_free_tier.

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