Skip to main content
Glama

Aigentra x402 API

chat_completions

Read-only

OpenAI-compatible chat completions LLM inference, pay per call ($0.0015 flat, no API key, no account). POST an OpenAI-style {model, messages, max_tokens, temperature} body, or GET with ?prompt=&system=. Open models: Llama 3.1 8B (default), SEA-LION v4 27B (tuned for Indonesian and Southeast Asian languages), Mistral Small 3.1 24B, Llama 3.2 3B. Returns the standard choices[0].message.content shape plus token usage. Non-streaming; up to 1,024 output tokens. Price $0.0015 USDC per call (x402, Base).

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

Input Schema

NameRequiredDescriptionDefault
modelNoModel alias, default llama-3.1-8b
promptYesUser message (GET variant), max 24,000 chars
systemNoOptional system prompt
max_tokensNo1-1024, default 512
temperatureNo0-2, default 0.7

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 only declare readOnlyHint and openWorldHint; the description goes well beyond them with pricing ($0.0015 USDC per call via x402 on Base), no API key or account required, non-streaming behavior, a 1,024 output-token ceiling, and the exact response shape (choices[0].message.content plus token usage). That is exactly the payment and rate-limit context 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the capability and cost, then models, then response format — a sensible order for an agent deciding whether to call it. It is dense and nearly every clause carries information, though the price is stated twice ($0.0015 flat, then $0.0015 USDC via x402), which is mild redundancy.

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?

There is no output schema, but the description explicitly documents the return shape and token usage, so nothing is missing on the response side. For a five-parameter inference endpoint, the description covers cost, auth model, invocation modes, limits, and model selection completely.

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, but the description adds real meaning: it clarifies the two invocation modes (POST body vs GET query params), names the available model aliases with their tuning characteristics, and confirms the defaults implied by the schema. The only gap is that it doesn't reconcile the schema's string typing for max_tokens/temperature with the numeric ranges it quotes.

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?

The description names a specific verb and resource ('OpenAI-compatible chat completions LLM inference') and immediately qualifies it with scope details (models, token cap, non-streaming). It is clearly distinguishable from task-specific siblings like ai_summarize, ai_translate, or embeddings, which imply a fixed transformation rather than raw chat completion.

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?

It gives concrete invocation context: POST an OpenAI-style body, or GET with ?prompt=&system=, and lists which models suit which language needs (SEA-LION for Indonesian/Southeast Asian). It does not explicitly say when to prefer this over ai_summarize/ai_translate, so the agent must infer that those are task-specific wrappers, but the operational guidance is strong.

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.