Skip to main content
Glama

replace_section

Replace the body of a Markdown section while preserving its heading. Update specific sections without affecting the rest of the file.

Instructions

Replace the body of a section, preserving its heading line.

The heading line is kept unchanged; only the body text is replaced. Returns "ok" on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
file_pathYes
new_contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations exist, so the description must carry behavioral disclosure. It states that the heading is preserved and returns 'ok' on success, but does not cover error cases (e.g., missing section or file), idempotency, or side effects. Adequate for a simple tool but not comprehensive.

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 concise sentences with no wasted words. The main purpose and key behavioral note (heading preserved) are front-loaded. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 3 required params and no output schema details, the description is too sparse. It lacks context on file paths, section hierarchy, error handling, and the output format beyond 'ok'. Sibling tools provide some context, but the description alone is insufficient for confident use.

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

Parameters2/5

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

Schema coverage is 0% (no descriptions on properties). The description does not explain the parameters (file_path, path, new_content) beyond their names. The agent must guess the format or meaning of 'path' (likely section path) and whether 'new_content' is plain text or markdown. Fails to compensate for missing 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 the action: replace the body of a section while preserving the heading. It distinguishes from sibling tools like add_section, delete_section, etc., by specifying exactly what is replaced (body) and what is preserved (heading).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage via its action, but lacks explicit guidance on when to use this tool vs. alternatives like patch_section. No when-not or exclusions are provided, so the agent must infer from context.

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/afriemann/md-mcp'

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