Skip to main content
Glama

Chat completions

chat_completions

Chat completions. OpenAI-compatible LLM chat completion (gpt-oss-120b, gpt-oss-20b, llama-3.3-70b, llama-3.1-8b, qwen3-30b on Cloudflare Workers AI). $0.002 per call over x402 (Base, Solana or X1). Call once without payment for terms, then pass payment.

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": {
      "messages": "<messages>"
    },
    "name": "chat_completions"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel id (default gpt-oss-120b): gpt-oss-120b, gpt-oss-20b, llama-3.3-70b, llama-3.1-8b or qwen3-30b
paymentNosigned x402 payment payload (PAYMENT-SIGNATURE).
messagesYesArray of {role, content} chat messages (or JSON string of messages).
max_tokensNoOptional max completion tokens (up to 1024).
temperatureNoOptional sampling temperature.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does most of it: discloses the x402 pay-per-call model, exact price ($0.002), accepted settlement chains (Base, Solana, X1), and a two-step handshake required before a paid call succeeds. Gaps remain on error/refund behavior and whether calls are stateless, but the cost and payment-gating traits are the ones an agent would most likely get wrong.

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?

Three dense sentences, front-loaded with the capability and followed by cost and the payment protocol in the order an agent needs them. The opening 'Chat completions.' largely echoes the title and could be merged, but nothing else is padding.

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?

For a 5-parameter tool with full schema coverage and no output schema, the description supplies the two things structured fields cannot: pricing model and the payment precondition. The return shape is implicitly covered by 'OpenAI-compatible', and the schema caps max_tokens; only failure modes are unaddressed.

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 every parameter including `payment` and `model` is already documented inline; the description only restates the model list and adds that `payment` is a signed payload, which the schema also says. Baseline 3 is correct because the schema does the heavy lifting.

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 ('OpenAI-compatible LLM chat completion') and names the concrete model set plus hosting provider (Cloudflare Workers AI), so an agent knows exactly what capability this exposes. The sibling catalog is entirely arc_*/agent_* tooling, so no differentiation burden applies here.

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?

Gives explicit operational sequencing: 'Call once without `payment` for terms, then pass `payment`' – a critical when/how instruction that an agent cannot infer from the schema. It stops short of stating failure behavior or limits (e.g., what the unpaid call returns, rate limits), so it is clear context without full exclusions.

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