Skip to main content
Glama

Edit section

edit_section
Destructive

Revise a draft guide section by replacing whole Markdown content or one exact substring, optionally updating its title or description. Requires the draft edit lock.

Instructions

Edit a draft section by whole-section replacement (content) or exact substring replacement (old_string + new_string; old_string must occur exactly once). Optionally update title/description. Draft-only; this server process must hold the draft's edit lock.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "guide_id": "<guide_id>",
      "section_id": "<section_id>"
    },
    "name": "edit_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoOptional new title.
contentNoNew full Markdown content (whole-section replacement). Do not combine with old_string/new_string.
guide_idYesGuide id (g_...).
new_stringNoReplacement text for old_string (may be empty). Required with old_string.
old_stringNoExact substring to replace. Must occur exactly once in the current section.
section_idYesSection id (s_...).
descriptionNoOptional new one-line description.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare destructive=true and idempotent=false. The description adds substantive behavior beyond that: whole-section replacement, exact-once substring matching, optional metadata update, draft-only scope, and edit-lock prerequisite.

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 tightly written sentences; modes and constraints are front-loaded with no filler.

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 the rich schema and annotations, the description covers the critical invocation constraints: replacement mode, draft-only scope, and lock prerequisite. It could say more about failure behavior when the lock is unavailable or old_string is non-unique, so 4.

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 coverage is 100%, and the schema already documents content, old_string, new_string, title, and description plus the combination rule. The description restates the key relationships but adds no new parameter semantics, so baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Edit') and resource ('draft section') and explains the two replacement modes. It is clear, but it does not explicitly name or contrast sibling tools such as add_section or read_section, so 4.

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?

It supplies clear context and constraints: draft-only and the server must hold the edit lock. It also distinguishes whole-section vs substring editing, but it does not explicitly state when to choose this over sibling tools.

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