Skip to main content
Glama

add_document

Add a standalone Markdown document for learners to read, highlight, and generate flashcards. Derives title from frontmatter, first H1, or first line when omitted; supports idempotent retries.

Instructions

上架一份新文档 (Markdown) 供学习者阅读/划线/生成闪卡, 不挂靠任何 course/lesson. title 缺省时按 frontmatter title → 首个 H1 → 首行截断 自动派生 (brief §2). source 固定为 mcp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo缺省时从 content_md 自动派生
content_mdYes
idempotency_keyNo可选。幂等键 (建议 uuid) —— 同一 key 重放此调用返回首次结果, 不重复写入. 网络重试/断线重连时带上同一个 key, 而不是猜"上次到底写没写".
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the content format (Markdown), title fallback logic, and fixed source value. However, it omits details like return value, error behavior, or permission requirements, leaving some transparency gaps.

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 tightly written sentences front-load the core purpose and then provide derivations and constraints. Every clause carries information, with no filler or redundancy.

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 create operation with no output schema, the description covers the key inputs, the standalone scope, title behavior, and fixed source. It doesn't explain return value or edge cases, but the schema's idempotency_key description covers retry semantics, making it reasonably complete.

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?

With 67% schema coverage, the description adds meaningful semantics: it clarifies that title is optional and auto-derived from content (frontmatter > H1 > truncated first line), and that content_md is Markdown. The idempotency_key parameter is already well-described in the schema, so no duplication is needed.

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 uses a specific verb ('上架' = publish) and a specific resource ('Markdown 文档'), and explicitly states it is not attached to any course/lesson, distinguishing it from add_lesson and update_document. It also clarifies title auto-derivation and fixed source, making the tool's function unambiguous.

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 clearly states the document is standalone ('不挂靠任何 course/lesson'), implying use for free-standing materials rather than course-linked lessons. It does not explicitly name alternatives or when-not-to-use, but the 'new document' and 'not attached' constraints provide clear contextual boundaries relative to sibling tools.

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