Skip to main content
Glama

chat_completions

OpenAI-compatible chat completions, flat $0.002 a call: the same request and response as OpenAI's /v1/chat/completions (messages, model, max_tokens, temperature, response_format json_object, stream), so an OpenAI SDK works by changing the base URL. Models: llama-4-scout (default), gpt-oss-20b, gemma-4-26b, glm-4.7-flash. Up to 10,000 characters in, 1,024 tokens out. Costs $0.002 USDC on Base via x402.

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 (default llama-4-scout; other names run on the default)
streamNotrue answers as Server-Sent Events chunks
messagesYesOpenAI-style messages
max_tokensNoMost tokens to generate (above 1,024 is capped)
temperatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "llama-4-scout",
      -  "gpt-oss-20b",
      -  "qwen3-30b",
      -  "glm-4.7-flash"
      -]New value: +[
      +  "llama-4-scout",
      +  "gpt-oss-20b",
      +  "gemma-4-26b",
      +  "glm-4.7-flash"
      +]
  2. Added

TDQS

A3.5/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden and it does supply genuinely useful behavior: a flat $0.002 per call, USDC-on-Base payment via x402, 10,000-character input and 1,024-token output caps, and SSE streaming. It omits error behavior, rate limits, and what happens on payment failure, which matter for a paid, unannotated tool.

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 identity and compatibility claim, then pricing and limits; there is essentially no filler. It is a single dense paragraph, so the model list and cost could be easier to scan, but no sentence is expendable.

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

Completeness3/5

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

With no output schema, the description leans entirely on the OpenAI-compatibility claim ('same request and response') to convey return values, which requires the agent to have prior knowledge of that API shape. Payment, model choice, and token limits are covered, but response format and failure modes are only delegated, not described.

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?

With 80% schema coverage the baseline is 3, and the description earns the step up: it names the model default (llama-4-scout), discloses the schema-invisible quirk that unrecognized model names silently fall back to the default, and restates the 1,024-token cap that the schema mentions only in passing. The response_format json_object option is called out even though it is not a top-level schema property.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource (chat completions) with a precise compatibility claim ('the same request and response as OpenAI's /v1/chat/completions') and names the concrete models available. It does not differentiate itself from sibling AI tools such as ai_chat or ai_chat_pro, leaving the agent to infer the distinction.

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 through the OpenAI SDK drop-in framing and the flat pricing, which signal when this is convenient. However, there is no explicit statement of when to pick this over ai_chat or ai_chat_pro, and no exclusions or prerequisites beyond the payment note.

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