Skip to main content
Glama

APEX AI, LLM, Embeddings, OCR & Media

Llm messages

llm_messages
Read-onlyIdempotent

Anthropic Messages API shape backed by open Workers AI models (gpt-oss-120b default, gpt-oss-20b, llama-3.3-70b, llama-3.1-8b, qwen3-30b). $0.002 per call over x402 (Base, Solana or X1) or X-API-Key. 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": "llm_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOpen Workers AI model (default gpt-oss-120b): gpt-oss-120b, gpt-oss-20b, llama-3.3-70b, llama-3.1-8b, qwen3-30b.
systemNoOptional system prompt.
paymentNosigned x402 payment payload (PAYMENT-SIGNATURE).
messagesYesArray of {role: "user"|"assistant", content} messages (or JSON string).
max_tokensNoOptional max output tokens (up to 1024).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint, openWorldHint, idempotentHint, non-destructive), the description discloses the cost ($0.002 per call), the accepted payment rails (x402 on Base, Solana or X1, or X-API-Key), and a mandatory two-step payment handshake. Those are real operational facts an agent needs before invoking. It omits rate limits, latency, and error behavior, which prevents a 5.

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 sentences: capability, price, protocol. The payment protocol is placed last where it belongs, and nothing is padded. The model enumeration duplicates the schema's own list, which is the one piece of low-value wording.

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 LLM endpoint with no output schema, the definition covers the essentials an agent must know: what model family, what it costs, and how auth/payment works. Return shape is implied by the named API shape. Rate limits and token-budget behavior for max_tokens are the remaining gaps.

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 coverage is 100%, so the schema already documents all five parameters including model names and max_tokens. The description re-lists the same model names rather than adding format or constraint detail, so it neither helps nor hurts relative to the schema; baseline 3 applies.

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?

The description names the interface contract ("Anthropic Messages API shape") and the backing models (gpt-oss-120b default plus four alternates), which tells an agent this is a chat-completion endpoint and how to select a model. It stops short of an explicit verb like "generate a completion," relying on the reader knowing what the Messages API shape implies.

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 an explicit operational sequence: call once without `payment` to get terms, then pass `payment`. That is actionable when-to-use guidance specific to this tool. It does not name alternatives or state when not to use it, which keeps it below a 5.

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.