Skip to main content
Glama

Chat completion (paid)

chat

Sends a chat completion through INFERVA's single endpoint and returns the reply with its USDG cost, fee breakdown, settlement hash and public receipt URL for verification.

Instructions

Send a chat completion through INFERVA's one endpoint. Requires INFERVA_API_KEY (an inf_sk_... agent key). The request is routed to a provider, metered, charged in USDG to the key owner's balance and written to the settlement log. Returns the reply plus cost_usdg, the fee breakdown (provider cost, protocol fee and its split between the capacity sponsor and the treasury), the settlement hash and a public receipt URL. Pass either prompt or messages.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel id from list_models. Default "auto" (cheapest active provider).
promptNoA single user message. Shortcut for messages: [{ role: 'user', content: prompt }].
messagesNoConversation, oldest first (the endpoint keeps the last 20).
max_tokensNoOutput token limit (max 1024).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnly=false, openWorld=true, idempotent=false, destructive=false; the description goes well beyond them by disclosing the billing mechanics (routed to a provider, metered, charged in USDG to the key owner's balance, written to a settlement log) and the auth requirement. It also enumerates the return payload including the fee split between capacity sponsor and treasury, which is exactly the kind of consequence an agent needs before spending money.

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?

Four sentences, front-loaded with the action and the auth prerequisite, then the billing consequence, then the return shape, then the input rule. Every clause carries information an agent would otherwise have to guess at, and the parenthetical fee breakdown is warranted because there is no output schema.

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?

This is a paid, non-idempotent, open-world tool with four parameters and no output schema, and the description covers all the resulting gaps: auth, cost model, settlement trail, and return fields (cost_usdg, fee breakdown, settlement hash, receipt URL). Nothing material for correct invocation is left unstated.

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, and the description earns an extra point by stating 'Pass either `prompt` or `messages`' — a mutual-exclusivity/at-least-one constraint the schema does not express, since no parameter is marked required. It adds no further detail on max_tokens or model beyond what the schema already documents.

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 ('Send a chat completion') scoped to INFERVA's single endpoint, which immediately separates it from the entirely read-only sibling set (get_stats, list_models, verify_settlement_chain, etc.). An agent can tell this is the only generative, money-charging operation in the catalog.

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?

Context is clear: it is a paid path requiring an inf_sk_... agent key, and it closes with a concrete selection rule between the two input styles ('Pass either prompt or messages'). It stops short of explicit when-not-to-use guidance (e.g. retry/idempotency advice or how to pick a model), leaving that inference to the agent.

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