Skip to main content
Glama

adhoc_thread_get

Access a persistent ad-hoc thread for a pair and retrieve its messages. Use after_message_id for incremental reads to minimize costs; omit for full history on first use.

Instructions

Get-or-create 这个 pair 的长存 AdHoc thread. 默认用当前 pair. 值更循环里带上你已读到的最后一条 id 只取增量 (after_message_id) —— 全量回读烧的是学习者的钱(值更契约·低损耗);全量仍合法:首次上任/断档补课时用 (不传 after_message_id 即全量, 缺省行为不变).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pair_idNo
after_message_idNo可选。只返回这条消息 id 之后的新消息 (增量读, 与 live_wait/GET /bridge/wait 同一套 isNewerEventId 排序语义). 缺省=全量回读整个消息历史——仅在首次上任/断档补课时用, 值更循环里请传上一次读到的最后一条消息 id.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that the tool may create a thread ('Get-or-create'), defaults to the current pair, and changes behavior based on after_message_id, including cost implications. It does not detail return format or error cases, but the key side-effect and cost traits are disclosed.

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?

The description is compact—two sentences—and front-loads the core purpose before diving into usage nuances. Every phrase earns its place, including the cost warning and default-behavior note. The structure is dense but efficient.

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?

Given the tool has no output schema and no annotations, the description covers the essential operational context: what it does, when to use incremental vs. full reads, and the cost trade-off. It lacks explicit return-value or error information, but for a get-or-create thread tool, the provided context is sufficient for correct invocation.

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 50%, with after_message_id having a rich schema description and pair_id having none. The description compensates by explaining that after_message_id enables incremental reads and that the default pair is used, adding practical meaning to pair_id. It does not fully detail every parameter but adds significant value beyond the schema.

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 'Get-or-create 这个 pair 的长存 AdHoc thread', which clearly identifies the verb (get-or-create), the resource (long-lived AdHoc thread), and the scope (the pair). This distinguishes it from sibling tools like adhoc_message_send or live_wait, which focus on messaging/waiting rather than thread retrieval/creation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use incremental reads ('值更循环里带上你已读到的最后一条 id 只取增量') and when full reads are appropriate ('首次上任/断档补课时用'). It also warns about cost implications of full reads, giving clear practical guidance for tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sf-shenfeng/learn-shell'

If you have feedback or need assistance with the MCP directory API, please join our Discord server