Skip to main content
Glama

messages

Read-only

Anthropic-compatible Messages API — Drop-in Anthropic Messages API shape (POST /v1/messages) served by Llama 3.3 70B on Workers AI. Body: {model, max_tokens (default 1024, max 4096), messages:[{role:user|assistant, content: string or text blocks}], system?, stop_sequences?, temperature?, top_p?, top_k?, stream?}. Returns {id, type:message, role:assistant, content:[{type:text,text}], stop_reason end_turn|max_tokens|stop_sequence, usage}. stream:true returns the standard SSE event sequence (message_start ... message_stop) in one response. Text only: image/document blocks and tools are rejected with 400 (never charged). Point an Anthropic SDK base_url at https://api.polyform.org. Price: $0.01 USDC (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": {
      "model": "<model>",
      "max_tokens": "<max_tokens>",
      "messages": "<messages>"
    },
    "name": "messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesllama-3.3-70b-instruct
messagesYes
max_tokensYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say read-only, open-world, non-destructive; the description goes far beyond by disclosing the price ($0.01 USDC on Base via x402), that rejected requests are never charged, and that stream:true returns the full SSE event sequence inside one response. It also pins down the returned object shape and stop_reason values, which an agent needs to parse output without an output schema.

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, then body, returns, streaming, constraints, and price in a tight single paragraph with no filler. It is dense to the point of being cramped, but every clause carries usable information.

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?

For a paid inference endpoint with no output schema and thin input schema, the description covers everything needed to call and interpret it: request body, defaults and limits, response shape, streaming format, error behavior, cost, and SDK wiring. Nothing essential is left for the agent to guess.

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 only 33% and the schema itself is thin (max_tokens typed as string, model description just a model name), so the description must compensate — and it does, documenting max_tokens default 1024 / max 4096, message role and content block forms, and the optional system, stop_sequences, temperature, top_p, top_k, and stream fields. The gap is that it enumerates fields the schema doesn't declare at all, so an agent may be unsure whether they are actually accepted.

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 a specific resource and shape — an Anthropic-compatible POST /v1/messages endpoint backed by Llama 3.3 70B on Workers AI — so an agent knows exactly what it will get back. It does not explicitly distinguish itself from sibling chat tools like ai_chat or ai_ask, which keeps it from a 5.

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 guidance ('Point an Anthropic SDK base_url at https://api.polyform.org') and a clear exclusion ('image/document blocks and tools are rejected with 400'). What's missing is any statement of when to prefer this over the many sibling ai_* chat/ask tools.

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