Skip to main content
Glama

Claude Sonnet API

llm_claude_sonnet
Read-only

Claude Sonnet API - pay per call, no API key. OpenAI-format chat completions on anthropic/claude-sonnet-5.5, pinned to Anthropic's own OpenRouter endpoint for reliability. You sign a fixed price computed from your max_tokens; unused tokens are not refunded. 20s server-side timeout - never charged if it fires; set your client timeout to 30s. Try GET /llm/claude-sonnet/sample.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messagesYesOpenAI-format chat messages: [{role, content}, ...].
max_tokensNoMax completion tokens, capped at 4096 - also bounds the price ceiling.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
modelNo
usageYes
choicesYes
x402_receiptNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only cover the safety/access profile (readOnlyHint, openWorldHint, idempotentHint=false). The description goes well beyond them with the billing model (fixed price computed from max_tokens, unused tokens not refunded), the 20s server-side timeout with a no-charge guarantee, and a recommended client-side timeout. These are exactly the behaviors an agent must know before invoking a paid endpoint, and they do not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Four dense sentences with zero filler: what it is, where it runs, how billing works, how timeouts behave, and where to find a sample. The most consequential facts (pay per call, no refunds, timeout behavior) are front-loaded.

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?

An output schema exists, so return values need no explanation, and the description covers model, format, cost, timeout, and a discovery endpoint. The remaining gap is selection guidance among the many sibling LLM tools, which would make it fully self-sufficient for routing.

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 description coverage is 100% for both parameters, so messages and max_tokens are already documented in structured form. The description echoes the pricing implication of max_tokens but adds no format, syntax, or constraint detail beyond the schema. Baseline 3 is appropriate when the schema carries the load.

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?

States a specific verb and resource — OpenAI-format chat completions — and pins the exact model (anthropic/claude-sonnet-5.5) on Anthropic's own OpenRouter endpoint. That model identity is precisely what separates it from the llm_gemini_flash / llm_gpt_mini / llm_deepseek siblings, so an agent can route without opening any schema.

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?

Gives operational usage context (pay per call, no API key, set client timeout to 30s, try the /sample endpoint), which is genuinely useful. However it never says when to prefer this model over the many sibling LLMs (cost tiers, latency, task type), and lists no exclusions. Usage is implied, not guided.

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.