Skip to main content
Glama

edit_section

Edit a specific section of a note by heading with replace, prepend, or append modes, preserving all other content and returning the edited section for confirmation.

Instructions

Edit one section of an existing note, located by heading (any level, fuzzy filename match). mode = replace | prepend | append. All content outside the targeted section is preserved. Returns the edited section for confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesFilename or vault-relative path.
modeNoHow to apply content.replace
contentYesThe content to write into the section.
headingYesThe heading whose section to edit.
auto_wikilinkNoAuto-insert [[wikilinks]] for discovered matches.
Behavior4/5

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

With no annotations provided, the description fully bears the burden of behavioral disclosure. It explains the three modes (replace, prepend, append) and states that non-targeted content is preserved. It also indicates the return of the edited section for confirmation. However, it does not specify behavior when the heading is not found or error handling, but overall it provides a clear behavioral model.

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 two sentences long, with the first sentence defining the action and location, and the second explaining the mode and preservation behavior. Every sentence is informative and there is no redundancy. It is appropriately concise and structured for quick reading.

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?

Given 5 parameters, no output schema, and a moderate complexity (edit with three modes, fuzzy matching), the description covers the primary behavior. However, it could be more complete by explaining what happens if the heading is not found or how the fuzzy match works. The return value is mentioned ('Returns the edited section for confirmation'), which adds completeness. Overall sufficient for an AI agent to use correctly.

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?

The input schema covers all parameters with descriptions (100% coverage). The description adds value by explaining that the heading lookup uses fuzzy filename matching and applies to any level, which is not in the schema. The mode options are already in the schema as an enum. The description adds some context but does not fully compensate for the schema's existing detail; however, it enhances understanding.

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 that the tool edits a section of an existing note identified by heading, with fuzzy filename matching. It specifies the action (edit one section) and the resource (existing note, located by heading), distinguishing it from siblings like append_to_note or read_section.

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 mentions that all content outside the targeted section is preserved, implying it is for surgical edits. However, it does not explicitly state when to use this tool versus alternatives like append_to_note for appending to the end of the note or read_section for reading. The context from sibling tool names provides implicit differentiation, but explicit guidance would be better.

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/KlossKarl/loom'

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