Skip to main content
Glama

compact

Condense the conversation when context fills, save a dense state to permanent memory, and return it so you can continue; previous details are still retrievable via recall.

Instructions

Compact the conversation when the context window is filling up (call around 70% full, before turns scroll away). Summarizes the session into a dense STATE block, saves it to permanent memory, and returns it. Continue from the returned block and treat earlier turns as discarded - nothing is lost, recall can retrieve it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversationYesThe conversation so far, as text.
Install Server

TDQS

A4.3/5.0
Behavior3/5

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

没有注解,但描述承担了透明度的责任。它声明这是破坏性操作(丢弃早期语境),但增加了安全保证(数据在永久内存中,recall可恢复),增加了丰富背景。它没有具体说明输出格式或机制,但因此给出一个3分,基于无注解条件下的描述质量。

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?

描述紧凑且组织清晰:先声明触发条件,然后说明行为(保存到保存,返回),再说明使用后续步骤。每个词都有价值,无多余。

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

Completeness5/5

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

该工具只有一个参数,无输出schema,描述足够让人正确调用它。工具的行为、触发时间和后续行动都已覆盖。唯一缺失的是返回格式,但这未形成阻碍,且不关键。

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中有一个参数conversation,其描述为“The conversation so far, as text.”并且schema覆盖率为100%,所以schema已经解释了参数。描述仅带有上下文提示(此参数用于压缩会话),但未额外添加语法或格式细节。基线为3分是合适的。

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?

描述清晰说明了工具的作用:当上下文窗口即将填满时,紧凑会话以释放空间。动词“紧凑”与资源“会话”明确,与兄弟工具(recall、timeline、remember)区分明显。此定义准确且行动导向。

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?

描述明确给出了使用的时机(约70%充满时,在转折滚动前)、原因(上下文窗口将满)、及后续行为(从返回块继续,早期转弯视为丢弃)。还明确说明替代方案(recall可以检索),这是明确的试用指引。

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

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/yungmoneyhuncho/longhaul'

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