Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| STATS_DB_PATH | No | Path where the DuckDB database for statistics will be stored | text_editor_stats.duckdb |
| PROTECTED_PATHS | No | Comma-separated list of file patterns or absolute paths that will be denied access | |
| MAX_SELECT_LINES | No | Maximum number of lines that can be edited in a single operation | 50 |
| DUCKDB_USAGE_STATS | No | Controls whether usage statistics are collected in a DuckDB database | 0 |
| ENABLE_JS_SYNTAX_CHECK | No | Enable/disable JavaScript and JSX syntax checking | 1 |
| FAIL_ON_JS_SYNTAX_ERROR | No | When enabled, JavaScript/JSX syntax errors will automatically cancel the overwrite operation | 0 |
| FAIL_ON_PYTHON_SYNTAX_ERROR | No | When enabled, Python syntax errors will automatically cancel the overwrite operation | 1 |
Schema
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| set_file | Set the current file to work with. This is always the first step in the workflow. You must set a file before you can use other tools like read, select etc. |
| skim | Read text from the current file, truncated to the first Returns: dict: lines, total_lines, max_select_lines |
| read | Read lines from the current file from start line to end line, returning them in a dictionary like {"lines":[[1,"text on first line"],[2,"text on second line"]]}. This makes it easier to find the precise lines to select for editing. Args: start (int, optional): Start line number end (int, optional): End line number Returns: dict: lines, start_line, end_line |
| select | Select lines from for subsequent overwrite operation. Args: start (int): Start line number (1-based) end (int): End line number (1-based) Returns: dict: status, lines, start, end, id, line_count, message |
| overwrite | Overwrite the selected lines with new text. Amount of new lines can differ from the original selection Args: new_lines (dict): Example: {"lines":["line one", "second line"]} Returns: dict: Diff preview showing the proposed changes, and any syntax errors for JS or Python |
| confirm | Confirm action |
| cancel | Cancel action |
| delete_file | Delete current file |
| new_file | Creates a new file. After creating new file, the first line is automatically selected for editing. Automatically creates parent directories if they don't exist. Args: filepath (str): Path of the new file Returns: dict: Status message with selection info |
| find_line | Find lines that match provided text in the current file. Args: search_text (str): Text to search for in the file Returns: dict: Matching lines with their line numbers, and full text |
| listdir | - |
| find_function | Find a function or method definition in a Python or JS/JSX file. Uses AST parsers. Args: function_name (str): Name of the function or method to find Returns: dict: function lines with their line numbers, start_line, and end_line |
| set_python_path | Set it before running tests so the project is correctly recognized |
| run_tests | Run pytest tests using the specified Python virtual environment. Args: test_path (str, optional): Directory or file path containing tests to run test_name (str, optional): Specific test function/method to run verbose (bool, optional): Run tests in verbose mode collect_only (bool, optional): Only collect tests without executing them Returns: dict: Test execution results including returncode, output, and execution time |