Skip to main content
Glama
arbitrage-anyprice
by pjrpjr

calculate_gpu_vs_api_arbitrage

Calculates GPU spot versus LLM API token arbitrage by applying VRAM physics, utilization caps, reliability haircut, and a 3:1 prompt-completion mix to reveal cost gaps.

Instructions

Run deterministic Gen-2 GPU spot vs LLM token API arbitrage math with hard VRAM physics, utilization ceiling, reliability haircut, and 3:1 prompt:completion mix.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "gpu": "<gpu>",
      "model": "<model>"
    },
    "name": "calculate_gpu_vs_api_arbitrage"
  }
}

Input Schema

NameRequiredDescriptionDefault
gpuYesGPUOffer fields (provider, offer_id, gpu_name, num_gpus, vram_gb_total, usd_per_hour, reliability, inet_down_mbps, verified, interconnect)
modelYesLLMModelQuote fields (model_id, name, prompt_usd_per_1m, completion_usd_per_1m, is_open_weight, param_billions_est)
utilizationNo
quantizationNoint4
prompt_to_completion_ratioNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations, so the description carries the full burden. It usefully discloses that the math is deterministic and that it applies a VRAM feasibility check, a utilization ceiling, a reliability haircut, and a 3:1 prompt:completion mix, but it never states whether the tool is pure computation or persists anything, nor what the result contains or its units.

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

Conciseness4/5

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

A single front-loaded sentence with no filler; the modeling assumptions follow the verb immediately. Density of unexplained jargon costs it a point but nothing is wasted.

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 nested input objects, five parameters, and no output schema, the definition should at minimum sketch the result shape and units (cost per token, break-even utilization) and quantify the reliability haircut and VRAM rule. Those assumptions are named but not defined, leaving a moderate gap for a calculation-only tool.

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 coverage is 40% across 5 parameters, so the description must compensate and only partly does: the 'utilization ceiling' and '3:1 prompt:completion mix' phrases correspond to the utilization and prompt_to_completion_ratio defaults. It says nothing about the quantization enum (fp16/bf16/fp8/int4), what it changes in the math, or how the nested gpu/model fields such as reliability or vram_gb_total are used.

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

Purpose4/5

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

States a concrete verb ('Run') plus a specific resource ('GPU spot vs LLM token API arbitrage math'), which is distinct from the siblings (audit, spread listing, ledger verification, backtest summary). Terms like 'Gen-2' and 'hard VRAM physics' are unexplained jargon that slightly cloud the purpose.

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?

No explicit when-to-use or when-not-to-use guidance and no named alternatives. Usage is only implied by the name and by the fact that it consumes GPUOffer and LLMModelQuote objects, so an agent must infer that verified offer data should be sourced elsewhere first.

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