Skip to main content
Glama

mcp-server-text-editor

by bhouston

text_editor

View, create, and edit files with persistent state across command calls. Perform actions like string replacement, line insertion, and file editing using commands such as view, create, str_replace, and insert.

Instructions

View, create, and edit files with persistent state across command calls. This tool is identical with Claude's built in text editor tool called text_editor_20241022

Input Schema

NameRequiredDescriptionDefault
commandYesThe commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`.
descriptionYesThe reason you are using the text editor (max 80 chars)
file_textNoRequired parameter of `create` command, with the content of the file to be created.
insert_lineNoRequired parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`.
new_strNoOptional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert.
old_strNoRequired parameter of `str_replace` command containing the string in `path` to replace.
pathYesAbsolute path to file or directory, e.g. `/repo/file.py` or `/repo`.
view_rangeNoOptional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "command": { "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`.", "enum": [ "view", "create", "str_replace", "insert", "undo_edit" ], "type": "string" }, "description": { "description": "The reason you are using the text editor (max 80 chars)", "type": "string" }, "file_text": { "description": "Required parameter of `create` command, with the content of the file to be created.", "type": "string" }, "insert_line": { "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`.", "type": "number" }, "new_str": { "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert.", "type": "string" }, "old_str": { "description": "Required parameter of `str_replace` command containing the string in `path` to replace.", "type": "string" }, "path": { "description": "Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`.", "type": "string" }, "view_range": { "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file.", "items": { "type": "number" }, "type": "array" } }, "required": [ "command", "path", "description" ], "type": "object" }
Install Server

Other Tools from mcp-server-text-editor

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/bhouston/mcp-server-text-editor'

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