Skip to main content
Glama

volt_check_price

Compare AI model pricing across providers to find cost-effective options. Returns sorted results with quality and reliability data for informed decisions.

Instructions

Compare pricing across providers for a given model. Returns offerings sorted by price with quality and reliability data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel name or partial match (e.g. "llama-70b", "gpt-4o", "deepseek")
max_resultsNoMaximum number of results to return (default: 5)

Implementation Reference

  • Handler function for the volt_check_price tool.
    export function handleCheckPrice(input: CheckPriceInput, feedCache: FeedCache) {
      const offerings = feedCache.getOfferings();
    
      if (offerings.length === 0) {
        return {
          content: [
            {
              type: 'text' as const,
              text: 'No pricing data available. The feed may still be loading — try again in a moment.',
            },
          ],
        };
      }
    
      const matches = comparePrices(offerings, input.model).slice(0, input.max_results);
    
      if (matches.length === 0) {
        return {
          content: [
            {
              type: 'text' as const,
              text: `No offerings found matching "${input.model}". Available models: ${getAvailableModels(offerings)}.`,
            },
          ],
        };
      }
    
      const rows = matches.map((o, i) => formatOfferingRow(o, i + 1));
      const cheapest = matches[0]!;
      const mostExpensive = matches[matches.length - 1]!;
    
      const avgCheapest = (cheapest.priceInputPerMillion + cheapest.priceOutputPerMillion) / 2;
      const avgExpensive = (mostExpensive.priceInputPerMillion + mostExpensive.priceOutputPerMillion) / 2;
      const savingsPercent =
        avgExpensive > 0 ? Math.round(((avgExpensive - avgCheapest) / avgExpensive) * 100) : 0;
    
      const header = `Price comparison for "${input.model}" — ${matches.length} offering${matches.length > 1 ? 's' : ''} found`;
      const footer =
        matches.length > 1
          ? `\nCheapest is ${savingsPercent}% less than most expensive option.`
          : '';
    
      return {
        content: [
          {
            type: 'text' as const,
            text: `${header}\n${'─'.repeat(60)}\n${rows.join('\n')}${footer}`,
          },
        ],
      };
    }
  • Zod schema for validating volt_check_price tool arguments.
    export const checkPriceSchema = z.object({
      model: z
        .string()
        .describe('Model name or partial match (e.g. "llama-70b", "gpt-4o", "deepseek")'),
      max_results: z
        .number()
        .int()
        .min(1)
        .max(20)
        .default(5)
        .describe('Maximum number of results to return (default: 5)'),
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that the tool returns sorted offerings with quality and reliability data, which adds some context about output behavior. However, it lacks details on critical aspects such as whether this is a read-only operation, potential rate limits, authentication needs, or error handling. For a tool with no annotations, this leaves significant gaps in understanding its operational traits.

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?

The description is a single, efficient sentence that front-loads the core purpose ('Compare pricing across providers for a given model') and immediately follows with the return value. There is no wasted wording, repetition, or unnecessary elaboration, making it highly concise and well-structured for quick understanding.

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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is partially complete. It clearly states the purpose and output format, but lacks behavioral details (e.g., safety, limits) and usage guidelines. Without an output schema, it does explain the return structure, which helps, but overall it falls short of being fully comprehensive for an agent to use the tool confidently in all contexts.

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%, meaning the input schema fully documents both parameters (model and max_results). The description does not add any parameter-specific details beyond what the schema provides (e.g., it doesn't explain the semantics of 'model' or 'max_results' further). According to the rules, with high schema coverage, the baseline score is 3, as the description doesn't compensate but also doesn't need to given the schema's completeness.

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's purpose with a specific verb ('compare pricing') and resource ('across providers for a given model'), and distinguishes it from siblings by focusing on price comparison rather than savings analysis, spending tracking, recommendations, or alerts. It explicitly mentions what the tool returns ('offerings sorted by price with quality and reliability data'), making the purpose distinct and well-defined.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus its siblings (e.g., volt_get_savings, volt_recommend_route). It does not mention any prerequisites, exclusions, or alternative tools, leaving the agent to infer usage based on purpose alone. While the purpose is clear, the lack of explicit context or comparisons reduces its helpfulness for tool selection.

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/newageflyfish-max/volthq'

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