Skip to main content
Glama

OptimToken: AI and Compute Economics

Estimate Self-Hosting Break-Even

estimate-self-hosting-breakeven
Read-onlyIdempotent

API or own capacity: the monthly volume at which renting GPU instances costs the same as paying a model's API per token. An API bill grows with every request, a rented instance costs the same whether it is busy or idle, so below the break-even the API is cheaper and above it the fleet is. Give a model, a workload and either an instance from the compute catalogue (instanceType) or an hourly rate of your own (hourlyRate). The answer costs the fleet at every rate the catalogue lists (on demand, spot, 1- and 3-year commitments) against the API at list price, at the optimized price with caching and batch, and at the cheapest host known, and compares them at your volume. Use it for 'at what volume does self-hosting Llama 3.3 70B on a g6e.12xlarge pay off' or 'is our 2M requests a month enough to rent our own GPUs'. It assumes neither a throughput nor an operations cost. Without outputTokensPerSecond each break-even states the output tokens per second the fleet would have to sustain around the clock; with it, the share of the fleet's capacity that volume uses, and whether it is out of reach. Without monthlyOperationsCost the fleet figures are hardware rent only: engineer time, storage, egress and failover are left out, and the text says so. It does not check that the instance can hold the model, and it reports whether the model's weights are published at all. Figures are final as returned and dated by provenance (API prices) and computeProvenance (instance rates).

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": {
      "model": "<model>"
    },
    "name": "estimate-self-hosting-breakeven"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesModel whose API price is the baseline, e.g. 'Llama 3.3 70B'. One name; the best match is used and other matches are reported.
regionNoPricing region of instanceType: us-east, us-west, europe, asia-pacific. Default: us-east
providerNoCloud provider of instanceType, needed only when two providers use the same instance name: AWS, Azure, GCP, DigitalOcean, OCI, OVH, Alibaba.
hourlyRateNoUSD per hour for ONE instance, for hardware the catalogue does not list: a GPU cloud, a quoted rate, owned hardware amortised per hour. Give this OR instanceType, not both.
cacheHitRateNoShare of input tokens served from the prompt cache, 0 to 1. Only valid with customInputTokens and customOutputTokens; the presets carry their own.
instanceTypeNoInstance the model would run on, exactly as the compute catalogue names it, e.g. 'g6e.12xlarge' or 'a2-highgpu-1g'. Find one with compare-compute-pricing (category 'GPU / Accelerated'). Give this OR hourlyRate, not both.
batchEligibleNoWhether the workload is asynchronous and can go through the batch API. Only valid with customInputTokens and customOutputTokens; the presets carry their own.
instanceCountNoInstances in the fleet, each billed every hour of the month. Default: 1
monthlyVolumeNoRequests per month the two are compared at, any integer. Default: 100,000
useCasePresetNoWorkload shape, which sets tokens per request and the caching and batch assumptions: supportTicket (1.5k in / 500 out), knowledgeQA (2k / 800), meetingSummary (10k / 1.2k, batch-eligible), marketingContent (2.5k / 1.8k), codingTask (3k / 2k), invoiceProcessing (1.5k / 600, batch-eligible), callSummary (2k / 700, batch-eligible), agentWorkflow (6k / 3k). Default: supportTicket. Ignored when custom token counts are given.
customInputTokensNoCustom input tokens per request. Must be supplied TOGETHER with customOutputTokens. A custom shape assumes no caching and no batch unless cacheHitRate / batchEligible say otherwise.
customOutputTokensNoCustom output tokens per request. Must be supplied TOGETHER with customInputTokens.
monthlyOperationsCostNoUSD per month for everything the hourly rate leaves out: the engineers who run the stack, storage, egress, failover capacity. Omitted means not included, not zero, and the answer says so.
outputTokensPerSecondNoMEASURED output tokens per second ONE instance generates at full load on this workload, all concurrent requests together. Omit it when it has not been measured: the tool then states the throughput each break-even requires instead of assuming one.

Output Schema

NameRequiredDescriptionDefault
apiYes
errorNo
fleetYes
modelYes
sourceYes
eloAsOfYes
optionsYes
dataAsOfNo
workloadYes
provenanceNo
resolutionYes
computeProvenanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed1 schema field changed
    • changedInput schema / properties / instanceType / description
      Previous value: -"Instance the model would run on, exactly as the compute catalogue names it, e.g. 'g6e.4xlarge' or 'a2-highgpu-1g'. Find one with compare-compute-pricing (category 'GPU / Accelerated'). Give this OR hourlyRate, not both."New value: +"Instance the model would run on, exactly as the compute catalogue names it, e.g. 'g6e.12xlarge' or 'a2-highgpu-1g'. Find one with compare-compute-pricing (category 'GPU / Accelerated'). Give this OR hourlyRate, not both."
  3. Changed2 schema fields changed
    • addedOutput schema / properties / computeProvenance / properties / degradedProviders
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "provider": {
      +        "type": "string"
      +      },
      +      "rows": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "provider",
      +      "rows"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / computeProvenance / properties / liveProviders
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "expected": {
      +      "type": "number"
      +    },
      +    "live": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "live",
      +    "expected"
      +  ],
      +  "type": "object"
      +}
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

Far beyond the readOnly/idempotent annotations, the description discloses the modelling assumptions (no throughput assumed, no operations cost assumed), what the result contains at each of several price tiers, that the instance/model fit is not validated, that model weight availability is reported, and that figures are authoritative only as of the `provenance` and `computeProvenance` dates. This is exactly the kind of caveat an agent needs to avoid over-claiming the answer.

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?

The core definition is front-loaded in the first two sentences, and the example queries land before the caveats. It is a single dense block, however, and the long enumeration of price tiers plus repeated restatement of the ops-cost and throughput omissions costs some readability. Nothing is outright filler, but a break into assumption/inputs/output paragraphs would help.

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

Completeness5/5

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

For a 14-parameter analytical tool with an output schema, the description covers what an agent needs before calling: required vs optional inputs, the consequence of each key omission, what is deliberately out of scope, and how fresh the numbers are. Return-value structure is rightly left to the output schema.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the prose adds conditional meaning the schema states only locally: the either/or between instanceType and hourlyRate, and the downstream behavioural difference when outputTokensPerSecond or monthlyOperationsCost is omitted (required throughput reported instead; ops excluded rather than zeroed). It does not explain region, provider, or instanceCount interactions, so it stops short of 5.

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 opening sentence states a precise, unusual quantity — the monthly request volume at which rented GPU capacity equals per-token API cost — and the second sentence explains the economic mechanism that makes the crossover real. An agent can distinguish this from estimate-llm-cost or compare-compute-pricing without opening any schema, and the definition explicitly routes instance lookup to compare-compute-pricing.

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 gives concrete trigger questions ('at what volume does self-hosting Llama 3.3 70B on a g6e.12xlarge pay off', 'is our 2M requests a month enough to rent our own GPUs') and states the required input combination (model, workload, plus instanceType OR hourlyRate). It also points to compare-compute-pricing for finding instance names. What it lacks is an explicit negative case — no statement of which sibling to use when the user actually wants a plain API cost estimate or a straight price comparison.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.