Skip to main content
Glama

Agentgates Compute

Price one machine (the x402 offer)

compute_quote
Read-onlyIdempotent

Gets the exact price of one machine without paying: sends the create request with no payment and returns the API's HTTP 402 offer, one leg per network, each with the amount in USDC, the address it is paid to, the token, how long a signature stays good, and what to sign. The API checks the plan, the hours and the setup first, so a refusal costs nothing. Pass machine_id and hours instead to price a renewal of a running machine (any wallet may pay one). To buy, sign one leg with your own wallet and send the same request with an X-PAYMENT header (compute_docs has the whole contract).

Input Schema

NameRequiredDescriptionDefault
planNoA plan id from compute_plans. Not with machine_id.
portNoWith image: the container port behind 8080 (default 80).
hoursYesPrepaid hours (within the plan's range), or hours to add on a renewal.
imageNoOne container image, served on host port 8080, e.g. nginx:alpine. Or send compose.
composeNoA docker-compose.yml as a string. It must publish a port. Or send image.
machine_idNoPrice a renewal of this machine instead of a new one (with hours only).

Output Schema

NameRequiredDescriptionDefault
okYes
codeNo
kindNo
legsNo
nextNo
errorNo
statusNo
requestNo
resourceNo
descriptionNo
x402VersionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish readOnly/idempotent/non-destructive, but the description adds real behavioral context beyond that: the API validates plan, hours and setup before returning an offer, so a refusal is free; the response contains one leg per network with amount in USDC, pay-to address, token, signature validity window, and signing payload. That is exactly the kind of pre-call and post-call behavior an agent needs for a payment flow.

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?

Front-loaded with the core action and tightly written, but the enumeration of offer fields and parenthetical asides make it denser than necessary; a little of the return-value detail is redundant against the output schema. Still efficient overall.

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 pricing/preflight tool in a payment workflow, it covers the mode switch, the validation-before-charge guarantee, the contents of the offer, and the handoff to the purchase path. With an output schema present and annotations covering the safety profile, nothing material is missing for correct invocation.

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 schema already defines every parameter, including the machine_id-for-renewal semantics and the image/compose and plan port relationships. The description reinforces the renewal form but adds no syntax, format, or constraint detail beyond the schema; baseline 3 applies.

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 verb and resource ('Gets the exact price of one machine without paying') and immediately explains the mechanism (create request with no payment → HTTP 402 offer). It also distinguishes the two modes (new machine vs. renewal via machine_id + hours), so an agent can tell exactly what this tool returns before 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 Guidelines5/5

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

Explicitly says when to use it (price without paying), when to switch form (pass machine_id and hours to price a renewal, payable by any wallet), and what the alternative path is (sign a leg and send the same request with X-PAYMENT to actually buy, with compute_docs as the reference). Nothing is left to inference.

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.

Resources