Skip to main content
Glama

glm chat completions

glm_chat_completions
Read-only

OpenAI-compatible chat completions on Zhipu GLM 4.7 Flash, reasoning and tool calling. Set your OpenAI SDK base URL to https://agentrxi.com/v1/glm and pay per token with x402 instead of an API key: $0.18 per million input and $1.2 per million output tokens, minimum $0.002 a call, at most $0.0082. The 402 quotes your request's maximum; "upto" payers are charged only the tokens used. Same request/response shape as OpenAI (tool calling, reasoning, streaming supported), up to 4096 output tokens. Costs $0.0082 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoIgnored; always glm-4.7-flash
toolsNoOpenAI function tools
streamNo
messagesYes
max_tokensNo
temperatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only give readOnlyHint/openWorldHint, so the description carries the interesting behavioral load: payment via 402 quote, that the quote is the request maximum, that 'upto' payers are charged only for tokens consumed, per-million token rates and a per-call min/max, streaming support, and a 4096 output-token ceiling. That is substantial context beyond the annotations. Minor ding for restating the $0.0082 figure as the flat per-call cost after already presenting it as the ceiling.

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

Conciseness3/5

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

Purpose is front-loaded and the text is dense rather than bloated, but it is payment-heavy and partly redundant: the $0.0082 maximum is stated twice (once as 'at most $0.0082' and again as a flat per-call cost), and the x402/'upto' payer mechanics get a full sentence that a caller can't act on.

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?

With no output schema, the description still covers the return contract via 'same request/response shape as OpenAI'. Combined with cost, streaming, token ceiling, and payment flow, an agent has enough to invoke it correctly. Only comparison against the crowded sibling model list is missing.

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 only 33% (only 'model' and 'tools' are documented), but the description compensates by asserting 'same request/response shape as OpenAI', which tells the agent messages/stream/max_tokens/temperature behave as in the OpenAI SDK. It also notes the 4096 output cap, which bounds max_tokens. Still, no per-parameter detail is added beyond that appeal to OpenAI compatibility.

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 ('OpenAI-compatible chat completions') plus the concrete model (Zhipu GLM 4.7 Flash) and capabilities (reasoning, tool calling), so the agent knows exactly what it gets. However, with roughly thirty sibling '*_chat_completions' tools in the same namespace (kimi, deepseek, qwen, glm5, glm5_flash, etc.), the description offers no differentiation from those near-identical alternatives.

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?

It explains the access mechanics (set SDK base URL, pay per token via x402 rather than an API key), which is genuinely useful setup context. But it never says when to choose this model over the many sibling chat-completion tools, nor any exclusion such as input limits or unsupported features — selection guidance is only implied by the pricing information.

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