Skip to main content
Glama

insert_at_line

Insert content at a specific line number in a file using a 1-based line numbering system. Specify the file path, line number, and content to insert.

Instructions

Insert content at a specific line number. Line number is 1-based.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file
lineYesLine number to insert at (1-based)
contentYesContent to insert
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic operation. It doesn't disclose behavioral traits like whether it modifies files in-place, handles errors (e.g., invalid line numbers), requires write permissions, or affects existing content (e.g., shifting lines). This is a significant gap for a mutation tool with zero annotation coverage.

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 a single, efficient sentence with zero waste. It's front-loaded with the core action and includes a critical detail (1-based line numbering) without unnecessary elaboration, making it easy for an agent to parse quickly.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavior (e.g., how insertion affects file structure), error handling, or return values. Given the complexity of file modification and rich sibling tools, more context is needed to ensure correct usage.

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 the schema fully documents parameters (path, line, content). The description adds minimal value by clarifying that 'line' is 1-based, which is already in the schema's description. No additional semantics beyond the schema are provided, meeting the baseline for high coverage.

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 clearly states the action ('Insert content') and target ('at a specific line number'), specifying it's for files. It distinguishes from siblings like 'create_file' or 'replace_content' by focusing on line-specific insertion. However, it doesn't explicitly mention it's for modifying existing files, which is implied but could be more precise.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like 'replace_content', 'insert_after_symbol', or 'insert_before_symbol' is provided. The description lacks context about prerequisites (e.g., file must exist) or exclusions, leaving the agent to infer usage from the name and parameters alone.

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/woohq/godette-mcp'

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