Skip to main content
Glama

add_section

Insert a new section into a Markdown file. Specify placement under, before, or after an existing section, or append at the end.

Instructions

Insert a new section into a Markdown file.

heading must start with 1–6 '#' characters followed by a space, e.g. "## New Section". content is the body text (no heading line). Placement: exactly one of under, before, after may be set, or all None to append.

  • under: insert as the last child of the named section

  • before: insert immediately before the named section

  • after: insert immediately after the named section (and all its children) Returns "ok" on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNo
underNo
beforeNo
contentYes
headingYes
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so description carries full burden. It covers placement behavior and return value but lacks details on error handling (e.g., file not found, invalid heading) and whether it overwrites existing sections.

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 concise with no wasted words, front-loaded with purpose, and uses bullet-like formatting for placement options for clarity.

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 6 parameters, 0% schema coverage, and no annotations, the description adequately covers parameter semantics and return value. However, it omits details on error conditions and file existence requirements.

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 0%, so description provides all parameter meaning. It explains heading format with example, content as body text, and placement parameters with clear semantics and constraint (only one of under/before/after).

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 'Insert a new section into a Markdown file' with a specific verb and resource. It distinguishes from siblings like delete_section by detailing placement options.

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 when to use each placement parameter (under, before, after) and defaults to appending when none are set. It does not explicitly exclude alternatives but sibling tool names make context clear.

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