Skip to main content
Glama
Filesystem MCP

Filesystem MCP

by domdomegg

Insert

insert
Destructive

Place text at a chosen line in a file, including the beginning or end, to perform line-based edits using an absolute path.

Instructions

Insert text at a specific line in a file.

  • insert_line = 0: Insert at the beginning

  • insert_line = N: Insert after line N

  • insert_line = -1: Insert at the end

  • insert_text should typically end with a newline

  • Use absolute paths

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to file
insert_lineYesLine number to insert after (0 = beginning, -1 = end)
insert_textYesText to insert (should end with newline)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the safety profile is covered. The description adds operational conventions (newline termination, absolute paths) but says nothing about in-place mutation consequences, whether the file must already exist, or how out-of-range line values are handled — context that matters for a destructive write.

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 purpose is front-loaded in the first sentence and the remaining lines are tight bullets that each carry distinct information. No sentence is redundant.

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?

For a 3-parameter mutation tool with annotations covering safety and no output schema, the description covers positioning, path form, and text formatting adequately. Minor gaps remain around failure modes (non-existent file, out-of-range line) and what the tool returns.

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 description coverage is 100%, so all three parameters are already documented, including the 0/-1 line mapping and the newline note. The description largely restates the schema's parameter descriptions rather than adding format, boundary, or error semantics beyond them, so the baseline 3 applies.

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 gives a specific verb+resource ('Insert text at a specific line in a file') and the line-index semantics make it operationally distinct from 'create' (new file) and 'str_replace' (in-place substitution). It does not explicitly name any sibling, so an agent must infer the boundary rather than being told it.

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?

Usage is implied through the insert_line mapping (0=beginning, N=after line N, -1=end) and the absolute-path convention, which tells the agent how to position an insertion. However, there is no statement of when to choose this tool over str_replace or create, and no prerequisite or exclusion guidance.

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

Deploy Server

Other Tools