Skip to main content
Glama
ShermanGu
by ShermanGu

weekly_report

Process final requests for Exchange EWS weekly reports: route facts into template slots, return draft context, and continue with a token to write the report.

Instructions

处理“周报”请求的唯一 Agent 入口。

request 是“本次要写入新周报的最终修改需求”。它既可以直接来自用户,也可以是 Agent 在调用本工具之前通过 search_mail/read_mail 读取其他人的周报或相关邮件后,先用 LLM 总结 得到的自然语言输入。若用户要求“总结 A、B 发给我的周报并生成我的周报”,应先完成邮件 搜索、读取和总结,再把总结结果作为 request 调用 weekly_report;不要把“去搜索并总结 A、B” 这类元指令原样作为 request。weekly_report 本身只处理自己的周报模板,不负责搜索他人的邮件。

返回紧凑 JSON:resume_token、mode、subject、request、instructions、最新模板的 slots, 以及前两周 history。slots.id 是本次上下文局部短 ID(s1、s2...),必须原样 使用,不得猜测或自行构造;loc 是压缩后的模板结构上下文,只用于理解版面和语义, 不参与真正写入定位。

生成下一周内容时,必须先语义拆解 request,再进行 slot routing。slot.loc 是原周报的显式 结构路径,每个路径文本后面的括号都会标明该文本在表格中的位置/层级身份,例如: 周报(纵向表头) = nl2sql项目(横向表头) > 项目进展(二级纵向表头)。= 表示一级 纵向表头与一级横向表头在当前内容位置交叉,> 表示继续进入更具体的下一级表头,越靠右 越具体。路由时主要理解括号前的真实表头文字,括号里的纵向/横向/二级等位置用于理解层级 和消歧;slot.text 是该路径末端当前承载的实际内容。不能因为某个 slot 文本关键词看起来最 相似,就把整段 request 放入该 slot。一段输入可以修改多个 slot;属于不同 loc 的事实必须 分别更新;只有确认属于同一 loc 的多条事实才合并后改写。用户本次事实 优先于历史;只提交确实需要变化的槽位;聊天性、情绪性或与正式周报无关的信息可以 忽略;无法可靠确定归属时不要猜测或修改无关 slot。 将口语化事实改写为简洁、正式、客观的周报文本;延续历史中的正式项目名和 技术术语,不得虚构事实。必须检查正文中所有周期性日期/周次并顺延。Server 会自动把可识别的 Subject 日期/周次顺延一周;返回的 subject 已是默认草稿主题。 然后调用 continue_action(resume_token=..., selections={"changes":[{"id":"s1","text":"..."}]})。 仅当用户明确要求不同主题时才传 selections.subject 覆盖默认值。本地参数错误时修正后复用同一 token;只有明确 context_stale、token 过期/已使用/被取代时才重新调用 weekly_report。

本工具不创建草稿,也绝不向 Agent 暴露 HTML。Server 会在 continue_action 阶段自动决定 Reply All 或新建草稿。

Input Schema

NameRequiredDescriptionDefault
folderNosentitems
foldersNo
requestYes
lookback_daysNo
subject_containsNo周报
reference_materialsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/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 discharges it: it specifies the returned JSON fields, the meaning and immutability of slots.id and loc, that it never creates drafts or exposes HTML, that the Server auto-advances Subject dates and chooses Reply All vs new draft, and the exact token-reuse/expiry rules. This is unusually rich disclosure for a mutation-style workflow.

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 long but dense, front-loaded with the identity claim and the critical semantics of `request` before moving to return shape and workflow. Given the complexity of the slot-routing and token lifecycle, most sentences earn their place, though a few procedural details could be trimmed.

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?

An output schema exists, yet the description still helpfully covers the return payload, token lifecycle, subject auto-advance, and the two-step continue_action handoff, so the workflow is complete. The main shortfall is the undocumented non-required parameters, which leaves how the tool sources prior weekly reports implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 6 parameters, so the description must compensate. It thoroughly explains only `request`; folder, folders, lookback_days, subject_contains, and reference_materials (a nested object array) are never explained, leaving an agent to guess how prior reports are located or what reference_materials should contain.

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 declares itself the sole Agent entry point for weekly-report (周报) requests, a specific verb+resource, and explicitly distinguishes itself from siblings by stating it does not search other people's mail (search_mail/read_mail do). An agent can tell it apart from the mail and draft tools without opening schemas.

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 gives explicit when-to-use sequencing: do search_mail/read_mail + LLM summarization first, then pass the summarized result as request, and specifically warns not to pass meta-instructions like '去搜索并总结 A、B' verbatim. It also names the follow-up tool (continue_action) and the conditions for re-invoking weekly_report.

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