Skip to main content
Glama

edit_document

Idempotent

Edit a Huly document by updating its title and body using full markdown replacement or targeted text search-and-replace.

Instructions

Edit an existing Huly document. You may rename with title and/or edit the body. Body editing has two mutually exclusive modes: (1) content replaces the entire markdown body, (2) old_text + new_text performs exact targeted search-and-replace. Use markdown links to current-workspace Huly browse URLs for native references; Huly browse links returned in get_document content round-trip as native references. The URL identifies the object; link text is display text; plain issue keys stay text. External URLs stay normal markdown links. For targeted replace, multiple matches error unless replace_all is true; empty new_text deletes matched text. Content supports native Mermaid diagrams. Returns a 'url' field pointing to the document in the Huly web app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamspaceYesa string that will be trimmed
documentYesa string that will be trimmed
titleNoa string that will be trimmed
contentNoFull replacement content (markdown). Mutually exclusive with old_text/new_text.
old_textNoExact text to find in the document. Must be non-empty. Mutually exclusive with content.
new_textNoReplacement text. Empty string deletes the matched text. Required when old_text is provided.
replace_allNoReplace all occurrences of old_text (default: false). Only used with old_text/new_text.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesThe successful tool result. The same value is also serialized as JSON in the text content for clients that do not read structuredContent.
warningsNoOptional agent-visible warnings about degraded result fidelity. Omitted when the server returned the documented happy-path payload.
Behavior5/5

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

Annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true) are consistent with editing behavior. The description adds valuable behavioral details: the two editing modes, mutual exclusivity, error on multiple matches unless replace_all, empty new_text deletes, and Mermaid diagram support. This exceeds what annotations provide.

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 front-loaded with the core purpose, then efficiently explains the two modes, markdown handling, and targeted replace behavior. Every sentence adds value without redundancy. It is appropriately sized for the tool's complexity.

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 description covers the editing purpose, parameter modes, return value ('url' field), and important details like markdown links and Mermaid diagrams. With an output schema present (indicated by 'Has output schema: true'), the description is complete for understanding how to use the tool effectively.

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?

Schema coverage is 100%, but the description adds critical context: mutual exclusivity of content and old_text/new_text, explanation that content replaces the entire body, and details about old_text pattern and replace_all. This clarifies relationships and usage beyond the schema descriptions.

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 'Edit an existing Huly document' with specific verbs and resource. It distinguishes from siblings like create_document and delete_document by focusing on modification of existing documents. The two editing modes are explicitly described, providing a precise purpose.

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 explains the two mutually exclusive modes and their parameters, and mentions error conditions for targeted replace. However, it does not explicitly state when to use this tool over other update tools or provide alternatives like create_document for new documents. The context is clear but lacks explicit exclusions.

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/dearlordylord/huly-mcp'

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