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, qwen3-30b, 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. Added

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses per-call pricing, the USDC-on-Base x402 payment rail, input/output limits (10k chars in, 1,024 tokens out), streaming support, and the fallback behavior where unknown model names run on the default. Undisclosed are payment failure handling, latency, and whether any request is refused on payment grounds.

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?

Dense and front-loaded: compatibility first, then models, then limits, then cost. Every clause carries information, though the single semicolon-chained sentence is harder to scan than a short bulleted structure would be.

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 paid inference endpoint with 5 params, no annotations, and no output schema, the description covers the decision-relevant facts: request/response shape, model options, size limits, streaming, and billing. An agent could call this correctly from the description alone, with only error/payment-failure behavior 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 80%, so the baseline is 3; the description earns an extra point by naming response_format json_object, which is not in the input schema, and by describing the model default plus the behavior for unrecognized model names. It also restates the max_tokens cap, which the schema already covers.

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 verb+resource (chat completions) with a precise compatibility claim and an explicit model roster, so an agent immediately knows what it gets. It does not differentiate itself from AI siblings such as ai_chat or ai_chat_pro, leaving the choice between them to inference.

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 context is implied rather than stated: the OpenAI SDK / base-URL swap and the flat $0.002 price tell an agent when this is attractive, and the 10,000-character input cap sets an operational boundary. There is no explicit when-to-use or when-not-to-use guidance relative to the other chat tools in the catalog.

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