Skip to main content
Glama
llm-price-mcp

llm-price-mcp

by under-stand

estimate_self_host

Calculate the USD cost per 1M tokens to self-host a model on rented GPUs and optionally compare that cost against API pricing.

Instructions

Estimate the USD cost per 1M tokens of self-hosting a model on rented GPUs.

cost_per_1M = gpu_hourly_usd / (tokens_per_second * 3600 * utilization) * 1,000,000

Args: tokens_per_second: Sustained aggregate throughput of the deployment (all concurrent requests together), in generated tokens per second. gpu_hourly_usd: Total hourly cost of the GPUs serving that throughput (e.g. 8 x price). utilization: Fraction of paid hours actually spent serving traffic, in (0, 1]. Default 1.0. compare_models: Optional OpenRouter model ids (unique substrings work) to compare against their API input/output prices per 1M tokens.

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": {
      "tokens_per_second": "<tokens_per_second>",
      "gpu_hourly_usd": "<gpu_hourly_usd>"
    },
    "name": "estimate_self_host"
  }
}

Input Schema

NameRequiredDescriptionDefault
utilizationNo
compare_modelsNo
gpu_hourly_usdYes
tokens_per_secondYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it exposes the exact formula, clarifies that tokens_per_second is aggregate sustained throughput across all concurrent requests, bounds utilization to (0, 1], and gives a concrete example ('8 x price') for gpu_hourly_usd. It does not say what happens if compare_models substrings match nothing, but the computation itself is fully transparent.

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?

One sentence of purpose followed immediately by the governing formula, then a parameter list. Every element is load-bearing given the absence of schema descriptions, and nothing is repeated from structured fields.

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?

An output schema exists so return values need not be explained, and all inputs are documented. The remaining gap is routing context: no statement of when this estimate should be preferred over compare_cost or cheapest, which matters in a five-tool pricing family.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must supply all parameter meaning, and it does: each of the four parameters gets units, semantic nuance (sustained aggregate vs per-request throughput), acceptable range, and default. The 'unique substrings work' note on compare_models adds genuinely non-obvious matching behavior.

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?

States a specific computation: USD cost per 1M tokens for self-hosting a model on rented GPUs. This is clearly distinct from siblings like gpu_rental_prices (raw prices) and compare_cost (API price comparison), so an agent can route without opening the schema.

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?

Usage is implied by the purpose (you have throughput and GPU cost figures and want a per-token unit cost), and compare_models hints at the relationship to API pricing. But there is no explicit when-to-use/when-not guidance relative to compare_cost or gpu_rental_prices, which an agent must infer.

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