Skip to main content
Glama

MCP Tools

by flesler

insert_text

Replace or insert text at specific line ranges in files using line-number operations. Ideal for large files or precise edits without context-heavy processing.

Instructions

Insert or replace text at precise line ranges in files

  • Ideal for direct line-number operations (from code citations like 12:15.ts) and large files where context-heavy editing is inefficient.
  • TIP: Combine with read_symbol to edit any symbol anywhere without knowing its file or line range!

Input Schema

NameRequiredDescriptionDefault
file_pathYesPath to the file
from_lineYesStarting line number (1-based)
textYesText to insert
to_lineNoReplace up to this line number (1-based, inclusive). If omitted only inserts

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "file_path": { "description": "Path to the file", "minLength": 1, "type": "string" }, "from_line": { "description": "Starting line number (1-based)", "minimum": 1, "type": "integer" }, "text": { "description": "Text to insert", "type": "string" }, "to_line": { "description": "Replace up to this line number (1-based, inclusive). If omitted only inserts", "minimum": 1, "type": "integer" } }, "required": [ "file_path", "from_line", "text" ], "type": "object" }
Install Server

Other Tools from MCP Tools

Related Tools

    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/flesler/mcp-tools'

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