Skip to main content
Glama

Add to a document, or to a task's page

append_doc

Add Markdown to an existing document at the end or under a named heading without altering existing text—ideal for logs, minutes, and dated notes.

Instructions

Add to a document that exists, at the end or under a heading you name. What is already written stays exactly as it is — you are adding, never rewriting, so nothing the person wrote can be lost and no print is needed. For what is chronological by nature — a log, minutes, the dated notes on a task's page. For a fact that changed, edit_doc the passage that says the old one: adding the new fact under the old leaves the document saying both. With under you can put a paragraph in the right part of a long document without reading any of it; outline_doc tells you which headings there are. The answer says how many characters it grew by; with echo it hands back the lines around what you added. A task's page takes it too, named by the task's id, on a task an agent filed or one the person opened to agents: what you add goes under the assistant's own notes, dated and signed, never among their words. On a task's page, replace writes the assistant's notes again whole instead of adding.

Input Schema

NameRequiredDescriptionDefault
docYesThe document's id, as `docs` hands it back — an opaque name like `q7ntmzbm-0001`, not its title — or a task's id, to add to that task's page
bodyYesMarkdown to add. A blank line is put between this and what was there
echoNoHand back the lines around the change as well, instead of reading the document again to see it
underNoA heading to add under, written as it reads. It goes at the end of what that heading holds, before the next one of its rank. Left out, it goes at the end of the document
replaceNoOnly with a task's id in `doc`: the assistant's notes on its page are written again, whole, as `body` — one dated digest of state, decisions, what was ruled out and references. The rest of the page stays as it is, a box in it never becomes a step, and what it replaced is kept for `restore_doc` with the task's id
keep_compactionNoOnly when the person told you in this conversation to keep a compaction of this document that waits for their word: it is kept, and this write goes ahead

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/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 behavioral burden and does so well: it says append never rewrites, existing content cannot be lost, no `print` is needed, `echo` returns surrounding lines, and `replace` preserves the replaced content for `restore_doc`. It also discloses task-page behavior including dated, signed assistant notes.

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 purpose and append-only guarantee are front-loaded, and the dense sentences mostly earn their place by covering alternatives and task-page behavior. It is long but justified by the tool's complexity, though some phrasing could be tightened.

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 six-parameter mutation tool with no annotations and no output schema, the description is complete enough: it explains the append-only guarantee, heading placement, return behavior (`grew`, `echo`), task-page rules, and `replace` semantics. The only parameter not covered in prose is `keep_compaction`, which is fully described in the 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 description coverage is 100% and the schema already explains every parameter in detail. The description adds some workflow context for `under`, `echo`, and `replace`, but it largely restates schema material and does not mention `keep_compaction` at all, so baseline 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 gives a specific verb and resource: add to an existing document at the end or under a named heading. It explicitly distinguishes append behavior from `edit_doc` for changed facts and points to `outline_doc` for headings, so an agent can identify the right tool 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 states when to use append for chronological content such as logs, minutes, and dated task notes, and when not to use it: a changed fact should use `edit_doc`. It also names `outline_doc` as the way to find headings and explains `replace` for task pages, giving explicit alternatives and conditions.

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