Skip to main content
Glama

update_document

Destructive

Modify an existing document's title or content. Replace or append text to update documents with corrections or new information.

Instructions

Modifies an existing document's title or content.

IMPORTANT: This tool replaces the document content rather than just adding to it. To update a document with changed data, you need to first read the document, add your changes to the content, and then send the complete document with your changes.

Use this tool when you need to:

  • Edit or update document content

  • Change a document's title

  • Append new content to an existing document

  • Fix errors or add information to documents

Note: For Mermaid diagrams, use mermaidjs (not mermaid) as the code fence language identifier for proper rendering.

Args: document_id: The document ID to update title: New title (if None, keeps existing title) text: New content (if None, keeps existing content) append: If True, adds text to the end of document instead of replacing

Returns: Result message confirming update

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYes
titleNo
textNo
appendNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description adds significant behavioral context beyond annotations: it warns that content is replaced (not just appended) unless the append parameter is true, and includes a specific formatting note for Mermaid diagrams. Annotations already indicate destructiveHint=true, and the description reinforces this without contradiction.

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 description is well structured with a purpose sentence, important note, bullet points, and a formatted Args section. While slightly lengthy, each part adds value and is front-loaded with key behavior. Minor redundancy (e.g., 'append' in both usage and parameter description) but overall effective.

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?

The description covers purpose, parameter semantics, and key behavioral traits. An output schema exists, so the brief mention of the return value is acceptable. However, it could be improved by noting typical error scenarios (e.g., invalid document_id) or confirming that the output object contains updated document fields.

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

Parameters5/5

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

With 0% schema description coverage, the description carries the full burden. It explains each parameter (document_id, title, text, append) with clear behavior (e.g., 'if None, keeps existing'). This adds meaning beyond the schema's type and default values.

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 clearly states the tool modifies an existing document's title or content, and lists specific use cases (edit, change title, append). This distinguishes it from siblings like create_document (creates new) or read_document (read-only).

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 provides explicit when-to-use scenarios in bullet points and includes an important note about content replacement. However, it does not explicitly state when not to use this tool (e.g., for creating new documents) or compare to alternative 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/fastmcp-me/mcp-outline'

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