Skip to main content
Glama

小秘书 MCP(secretary-mcp)

给主 Agent 减负的子 Agent 模式 MCP。只向主模型暴露三个高层工具:

工具

作用

子 Agent 内部可用能力

ask_memory

回忆此前记住的偏好/事实/笔记

memory_search / memory_list / memory_read

ask_web

联网查证一个问题,返回凝练结论+来源

web_search / fetch_url(多轮搜索→精读→再搜)

delegate

整体交办一件多步骤杂活

上述全部 + memory_write

核心机制:主模型上下文只增加「一次工具调用 + 一条凝练结论」。子 Agent 的多轮 tool_call(搜索 → 打开网页 → 再搜 → 收敛)全部发生本进程内,原始网页大段文本、 搜索结果列表永远不会进主模型上下文。子 Agent 必须通过 submit_answer 提交结论, 并有轮次上限(默认 10 轮,超限强制收敛)。

配置(MCP 客户端接入)

{
  "mcpServers": {
    "secretary": {
      "command": "node",
      "args": ["<本目录绝对路径>/dist/index.js"],
      "env": {
        "LLM_API_KEY": "你的 API Key",
        "LLM_BASE_URL": "https://open.bigmodel.cn/api/paas/v4",
        "LLM_MODEL": "glm-4.5-flash",
        "SECRETARY_MEMORY_DIR": "<本目录绝对路径>/memory",
        "TAVILY_API_KEY": "可选,推荐配置"
      }
    }
  }
}

环境变量

变量

必填

说明

LLM_API_KEY

子 Agent 用的便宜模型 API Key

LLM_BASE_URL

OpenAI 兼容端点,默认智谱 https://open.bigmodel.cn/api/paas/v4(DashScope/DeepSeek/OpenAI 均可)

LLM_MODEL

默认 glm-4.5-flash

SECRETARY_MEMORY_DIR

记忆库目录,默认 ./memory

TAVILY_API_KEY

搜索供应商;不配则回退 DuckDuckGo HTML(无密钥但可能被限流)

SUBAGENT_MAX_TURNS

子 Agent 最大轮次,默认 10

Related MCP server: agent-delegate

构建

npm install
npm run build

设计说明

  • 记忆库:本地 markdown 文件(可手改),按段落切块 + 关键词词频打分检索, 内置中文虚词停用词表,零向量库依赖。

  • 搜索:有 TAVILY_API_KEY 走 Tavily;否则解析 DuckDuckGo HTML 页(宽松解析, 改版/限流会失败,生产建议配 Tavily)。

  • 网页抓取:剥掉 script/style 取正文,单页截断 9000 字符,防止子 Agent 上下文爆炸。

  • 容错:模型不调 submit_answer 而直接输出文本时视为最终答案;轮次用尽则强制 无工具收敛一次;工具报错会作为消息回给子 Agent 让它自行调整。

已知取舍

  • 记忆检索是词频匹配,不是语义检索——查询词需要和记忆原文有字面重叠。

  • delegate 的子 Agent 有 memory_write 权限,可写任意 .md 文件(已做路径逃逸防护)。

  • 主 Agent 应给 delegate 传自包含的任务描述,子 Agent 看不到主对话。

Available Tools

3 tools
ask_memoryA

问自己的长期记忆库(本地 markdown 文件)。用于回忆此前记住的偏好、事实、笔记、结论。返回检索整理后的答案;记忆库为空或无匹配时也会如实说明。

ParametersJSON Schema
NameRequiredDescriptionDefault
questionYes想回忆的内容,如'用户的时区偏好是什么'

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden. It explicitly discloses that the tool returns a retrieved/synthesized answer and states that it will honestly report when the memory store is empty or no match is found. This is strong behavioral coverage for a simple retrieval tool, though it does not explicitly confirm that it makes no modifications.

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 three short sentences, each earning its place: define the resource, state the use case, and describe return behavior plus edge cases. There is no filler, no repetition of schema content, and the most important distinguishing information is front-loaded.

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?

For a one-parameter tool with no output schema and no annotations, the description covers the resource, the intended use case, the return behavior, and the empty/no-match edge case. It does not explicitly discuss side effects or contrast with sibling tools, but nothing essential appears missing for correct invocation.

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 description coverage is 100%, and the single parameter 'question' already includes an explanatory example ('想回忆的内容,如...'). The tool description reinforces the memory-store context but adds no materially new parameter-level details, so the baseline score of 3 is appropriate.

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 '问自己的长期记忆库(本地 markdown 文件)', giving a specific verb, resource, and storage format. It lists the content domains it covers (preferences, facts, notes, conclusions) and is implicitly distinguished from the sibling ask_web by emphasizing '自己的长期记忆库'. This leaves no ambiguity about what the tool does.

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 phrase '用于回忆此前记住的偏好、事实、笔记、结论' gives clear guidance on when to use this tool. It does not explicitly state when not to use it or name alternatives like ask_web or delegate, so it falls short of a 5, but the intended use case is unmistakable.

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

ask_webA

联网查资料。内部子 Agent 会多轮搜索、打开网页、交叉核对后给出凝练结论(带来源链接)。适合'查一下某库最新版本/某事实/某价格'这类会吃掉大量上下文的调研。

ParametersJSON Schema
NameRequiredDescriptionDefault
questionYes要查证的问题,尽量具体,含关键限定词

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and reveals meaningful behavior: an internal sub-agent performs iterative searches, opens web pages, cross-checks information, and returns a concise conclusion with sources. It also warns that the operation consumes a lot of context. It does not mention failure modes or external service dependencies, but covers the main behavioral traits.

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?

Two dense sentences: the first defines what it does, the second when to use it and what behavior to expect. Every clause contributes value and there is no redundant filler.

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?

The tool has only one parameter, no output schema, and no annotations. The description explains the operation, the internal process, the output format (conclusion with sources), and the appropriate scenarios, making it complete for an agent to select and invoke the tool correctly.

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 description coverage is 100%, so the single 'question' parameter is already well documented. The description adds context about the kind of questions to ask and notes the research will consume context, but it does not materially extend the parameter's meaning beyond the schema.

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 description clearly states the tool performs web research ('联网查资料') and describes the multi-step behavior: searching, opening pages, cross-verifying, and returning a concise conclusion with sources. It differentiates from siblings implicitly via '联网', but does not explicitly name ask_memory or delegate, so it loses the top point.

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?

It explicitly identifies suitable use cases: checking a library version, a fact, or a price, and characterizes these as context-consuming research tasks. This gives clear usage guidance, though it does not name alternatives or state when NOT to use the tool.

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

delegateA

把一件多步骤杂活整体交办给子 Agent。子 Agent 可联网搜索、抓网页、读写记忆库,自主多轮操作后交回最终成果。适合调研汇总、整理资料、把结论存入记忆等。任务描述要自包含。

ParametersJSON Schema
NameRequiredDescriptionDefault
taskYes任务描述,自包含(子 Agent 看不到主对话)
backgroundNo可选:相关背景/已知信息/上下文

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral disclosure burden. It reveals that the sub-agent can search the web, scrape pages, read/write memory, operate over multiple turns, and return a final result. It also warns that the task must be self-contained because the sub-agent cannot see the main conversation. It stops short of mentioning cost, latency, or side-effect details, but the core behavior is well 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 three short sentences with no filler. It front-loads the main action, then gives capability context, examples, and a critical invocation warning. Every sentence earns its place.

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?

For a tool with no annotations and no output schema, the description provides enough for correct selection and invocation: what it does, what the sub-agent can do, typical use cases, and the self-contained task requirement. It could be more complete by explicitly routing simple queries to ask_memory/ask_web and noting possible side effects of memory writes, but overall it is sufficient.

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 schema already documents task and background. The description adds meaningful semantic guidance: the task parameter should describe a multi-step chore, be self-contained, and target research/organization/memory-writing goals. This goes beyond simply restating 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?

Description states a specific verb and resource: delegate an entire multi-step chore to a sub-agent. It clearly distinguishes this from the sibling tools ask_memory and ask_web by emphasizing multi-step autonomous execution rather than a single direct query.

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 description gives concrete suitable use cases: research summarization, organizing materials, and storing conclusions into memory. It implies this is for whole tasks that need multiple steps, but it does not explicitly state when not to use it or mention the sibling tools by name as alternatives.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedask_memory
    • First observedask_web
    • First observeddelegate

TDQS

A4.1/5.0
Disambiguation4/5

ask_memory and ask_web are cleanly separated by information source (local notes vs internet), and delegate is positioned as a general multi-step task handoff rather than a simple query. There is some overlap because delegate can also search the web and touch memory, but the descriptions make the intended use cases clear.

Naming Consistency4/5

ask_memory and ask_web follow a clear ask_<source> pattern, while delegate breaks the ask_ prefix but still uses a single, readable verb that signals a different kind of action. The naming is consistent in style (lowercase snake_case) and easy to predict.

Tool Count4/5

Three tools is on the lean side for a 'secretary' server, but each tool covers a broad, high-level capability: recall, research, and delegation. The count feels slightly under-scoped rather than excessive, and no tool feels redundant.

Completeness3/5

The tool surface covers core secretary workflows like recalling stored information, researching current facts, and handing off messy tasks. However, there is no direct tool to save/update/delete memories—write access only exists indirectly through delegate—and broader secretary features like task or calendar management are absent.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    agent-delegate is an MCP-first delegation advisor for coding agents. It helps a main agent decide when to delegate read-only investigation, generate bounded subagent briefs, and summarize subagent results back into compact main-agent context.
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI coding agents like Claude Code or Codex to delegate tasks to a DeepSeek Harness subagent with its own context window, providing tools for task delegation, result waiting, continuation, and supervision with sandboxed execution.
    6
    MIT

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/Ellen-11/secretary-mcp'

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