Skip to main content
Glama
Local AI Relay
by zxc972

chat_context

Recovers room checkpoints, rules, and limited history, or reads original messages by ID, offset, delivery ID, or sequence. Restores compressed context on demand without confirming messages.

Instructions

v2 不带定位参数时恢复检查点、规则和有限历史;不会确认消息。指定 message_id/offset、delivery_id 或 after_seq 时只读原文,不附摘要。长消息连续分页;压缩后按需恢复,不在每条消息或空闲时调用。

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": {
      "room": "<room>"
    },
    "name": "chat_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
roomYes
budgetNo
offsetNo
serverNo网络房间的 http(s) 服务地址;省略为本机房间
after_seqNo
message_idNo
session_idNo当前独立会话的固定 ID;新接入必填并在所有调用中沿用。有原生 thread_id 时须相同,否则本会话生成一次 UUID。省略仅兼容旧接入。
delivery_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=false and openWorldHint=true, so the description carries most of the load, and it delivers: no message acknowledgement, mode-dependent return content (checkpoint/rules/history vs raw text only), and continuous pagination for long messages. It does not clarify what 'restore checkpoint' actually changes on the server, which matters given readOnlyHint=false.

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?

Three semicolon-separated clauses with no wasted sentences, which is efficient. But the front-loading is weak (it opens with a version marker) and the dense packed phrasing makes mode boundaries harder to parse than they need to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, dual-mode tool with no output schema, the description covers calling cadence and return content reasonably. It is still incomplete on the required room parameter, on when budget should be raised or lowered, and on what state the checkpoint restore actually affects.

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 25%, and the description partially compensates by grouping message_id/offset, delivery_id, and after_seq as mutually equivalent 'locating' selectors and implying budget bounds the history. However, the required 'room' parameter, 'budget', and 'session_id' receive no explanation anywhere, so a quarter of the parameter meaning is still missing.

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 two operating modes are concrete: without locating params it '恢复检查点、规则和有限历史', and with message_id/offset, delivery_id, or after_seq it '只读原文,不附摘要'. That is specific enough to separate it from chat_receive/chat_ack, but the tool never states its purpose in one plain opening sentence, and the leading 'v2' adds no meaning.

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?

The closing clause gives an explicit when ('压缩后按需恢复') and explicit when-not ('不在每条消息或空闲时调用'), which prevents the most likely misuse (polling it like chat_receive). It stops short of naming sibling alternatives outright, so the routing guidance is implied rather than spelled out.

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