Skip to main content
Glama

chat

Call hosted Token Factory models via an OpenAI-compatible API using prompts, messages, images, or tool calls; aggregate streams to avoid non-stream timeout cutoffs.

Instructions

调用 Token Factory 聊天模型(OpenAI 兼容;内部流式聚合,防 10 分钟非流式掐断)。

输入二选一:prompt(+可选 system)便捷形式,或完整 messages(role: system/user/assistant/tool)。 images 为 URL/data URL/本地路径列表,附加到最后一个 user 消息(仅视觉模型支持,见 list_models)。 reasoning_effort 跨模型安全值 low/medium(high 在 Qwen3.8-27B 上 400,xhigh 在 GLM-5.3-Flash 上 422); 思考文本在返回的 reasoning 字段。部分模型默认思考且消耗 max_tokens 预算,预算过小会得到空 content。 支持 response_format={"type":"json_object"} 与 tools/tool_choice。 注意:stop/seed/logprobs/top_k 等参数会被网关静默丢弃。免费但计入每日 pts 配额;禁止生产用途。

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>"
    },
    "name": "chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYes
toolsNo
top_pNo
imagesNo
promptNo
systemNo
messagesNo
max_tokensNo
temperatureNo
tool_choiceNo
response_formatNo
reasoning_effortNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: internal streaming aggregation to avoid the 10-minute non-streaming cutoff, reasoning text surfacing in a separate `reasoning` field, some models thinking by default and consuming max_tokens (yielding empty content when the budget is small), gateway silently dropping stop/seed/logprobs/top_k, free but quota-metered against daily pts, and an explicit no-production-use restriction. These are exactly the non-obvious traits an agent cannot infer from structured fields.

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?

The text is dense but well front-loaded: the model-call purpose and the two input forms come first, followed by per-feature caveats and a closing warning block. For twelve parameters with zero schema coverage, the length is justified, though the reasoning_effort model-specific failure details are slightly verbose relative to their weight.

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?

There is no output schema, so the description should explain returns; it discloses that thinking text arrives in `reasoning` and that small max_tokens can produce empty content, but it never sketches the overall response shape (choices/content), relying on the OpenAI-compatible convention. Combined with the quota, prohibition, and dropped-parameter warnings, this is nearly complete for a 12-parameter tool.

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 description coverage is 0%, so the description must compensate, and it explains the semantics of prompt, system, messages, images, reasoning_effort, response_format, tools/tool_choice, and the max_tokens interaction with reasoning models. Only temperature and top_p are left without added meaning, and the note about dropped stop/seed/logprobs/top_k is useful negative information.

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 opens with a specific verb+resource ("调用 Token Factory 聊天模型") plus an OpenAI-compatible qualifier, which immediately distinguishes it from siblings such as ocr, speech, and list_models. It also points to list_models for vision-capable model selection, so an agent can place this tool relative to its neighbors without opening the schema.

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 clear input-shape guidance (prompt+optional system OR full messages with role: system/user/assistant/tool) and conditions for image use (only vision models, see list_models) and reasoning_effort values (low/medium safe; high/xhigh fail on specific models). It does not explicitly say when to prefer this over siblings such as ocr or speech, but the usage context is otherwise unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.