Skip to main content
Glama

读会话最近的聊天(模型的上文)

feishu_recent
Read-only

Fetch recent Feishu chat messages as chronological text to see what was just said before replying, editing files, or referencing a message ID.

Instructions

拉取某个飞书会话最近的消息,按时间正序(早→晚)拍平成文本,让模型知道「刚才聊了什么、谁在说」。典型用法:被叫醒后、要回复之前、要接着上文改文件之前,先调一次这个再动手;也用来确认某个人刚才发的那句话的 message_id,好配合 feishu_reply / feishu_download 用。默认会过滤掉机器人自己发的消息(对模型是噪音),需要看自己说过什么时传 include_bot=true。format=compact 只有「时间 发送人:内容」,适合快速读;format=full 额外带 message_id / msg_type / sender_id,适合接下来要针对某条消息做操作。要「发问并等人回答」不要用这个(轮询要自己写),用 feishu_ask。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "feishu_recent"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo取多少条,默认 15,最大 50(超了按 50 算)。
formatNocompact=「[14:23] 张三:内容」(默认);full=再带 message_id/msg_type/sender_id。
chat_idNo会话 id(oc_ 开头)。不填用默认会话(FEISHU_DEFAULT_CHAT_ID)。
include_botNo是否保留机器人自己发的消息。默认 false(过滤掉,因为对模型是噪音)。
since_minutesNo只要最近 N 分钟内的消息;不填表示不限时间。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the description's added value is the non-obvious default that the bot's own messages are filtered out as noise, plus the 50-item clamp and the polling caveat. It stops short of describing truncation/pagination of the flattened text, which is the one behavior an agent could still trip over.

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?

One dense paragraph that is front-loaded with purpose, then usage, then parameters, then the alternative — no filler sentences. It is on the long side and the format explanation partly restates the enum text, keeping it just short of a 5.

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?

For a read-only fetch with no output schema, the definition covers return shape ("时间 发送人:内容"), ordering, default filtering, and the follow-up tools that consume the message_id. Nothing needed to call it correctly or interpret the result is missing.

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 100%, so the baseline is 3, but the description goes further by explaining *why* to pick each format ("compact 适合快速读;full 适合接下来要针对某条消息做操作") and why include_bot defaults off — situational meaning the schema only states tersely. It omits chat_id's default-chat fallback, which the schema already covers.

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 and resource ("拉取某个飞书会话最近的消息") plus the transformation applied ("按时间正序拍平成文本"), so the agent knows exactly what comes back. It explicitly separates itself from feishu_ask ("要「发问并等人回答」不要用这个") and positions itself as a prerequisite for feishu_reply / feishu_download.

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?

It names concrete trigger points ("被叫醒后、要回复之前、要接着上文改文件之前,先调一次这个再动手") and an explicit exclusion with the alternative to use instead (feishu_ask, because polling must be hand-written). Both the when and the when-not are stated, not inferred.

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