Phil's ST MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_active_fileA | Return the active file's path, full content, cursor line/col, dirty flag, and syntax name. |
| get_selectionA | Return the current selection(s): text and begin/end line+col for each. |
| get_cursor_contextA | Return |
| get_open_filesA | List all files open in the current window (path, name, is_dirty). |
| get_project_foldersB | Return the project's root folder paths. |
| get_file_contentB | Return the full content of an already-open file by its path. |
| get_view_contentA | Return the full content of any open tab by name (partial match, case-insensitive). Works for Terminus tabs and other nameless views that have no file path. Omit name to read the active view. |
| get_view_sizeA | Return the total character count of any open tab by name (partial match, case-insensitive). Use before get_view_chars to compute offsets — e.g. begin=size-5000, end=size for the tail. Omit name for the active view. |
| get_view_charsA | Return text at character offsets begin..end (0-based, end exclusive) from any open tab. Works for Terminus tabs and any other view. Clamps to buffer bounds automatically. Use get_view_size first, then e.g. begin=size-5000, end=size to read the last 5000 chars. Omit name for the active view. |
| get_view_phantomsB | Return phantom HTML and extracted text from a view by name. If key is omitted, defaults to the common 'pybackup' phantom key. |
| send_to_viewA | Send a string to any open tab by name (partial match, case-insensitive). For Terminus tabs this types the text into the terminal as if the user typed it. Include a trailing newline (\n) to execute a command. Omit name to target the active view. |
| get_output_panelA | Return the text content of an output panel. If name is omitted, read the active output panel. Use name='exec' for build output. |
| get_symbolsA | Return all symbols (functions, classes, etc.) in the active file with line numbers. |
| lookup_symbolC | Find where a symbol is defined across all open files. |
| get_project_dataA | Return the raw .sublime-project JSON data for the current project. |
| add_folderC | Add a folder to the current project. |
| remove_folderC | Remove a folder from the current project by path. |
| get_variablesA | Return Sublime Text's build variables: $file, $project_path, $platform, etc. |
| open_fileB | Open a file in Sublime Text, optionally jumping to a specific line and column. |
| goto_lineB | Move the cursor to a line (and optional column) in the active file. |
| show_panelA | Bring an output panel to the front. Use name='exec' for the build panel. |
| replace_selectionC | Replace the current selection(s) with text. |
| replace_linesB | Replace lines begin through end (inclusive, 1-based) in the active file with text. Pass path to target a specific open file regardless of which tab is focused. |
| run_commandC | Run any Sublime Text command. scope='window' (default) or 'view'. |
| run_buildC | Trigger the current build system, or pass cmd/shell_cmd to run a specific command. |
| set_statusC | Write a message to Sublime Text's status bar. |
| save_fileA | Save a file. Pass path to save a specific open file; omit path to save the active file. |
| save_allB | Save all open files. |
| close_fileA | Close a file by path, or close the active file if path is omitted. |
| revert_fileA | Revert the active file to its last saved state, discarding unsaved changes. |
| undoA | Undo the last edit in the active file. |
| redoA | Redo the last undone edit in the active file. |
| duplicate_lineA | Duplicate the current line(s) in the active file. |
| toggle_commentA | Toggle line comment (or block comment if block=True) on the current selection. |
| sort_linesA | Sort the selected lines (or all lines if nothing is selected). |
| select_linesA | Select lines begin through end (1-based, inclusive). end defaults to begin. |
| fold_linesB | Fold (collapse) lines begin through end (1-based) in the active file. |
| insert_snippetA | Insert a snippet at the cursor using Sublime Text's snippet syntax (e.g. $1 for tab stops). |
| find_in_fileA | Find all occurrences of pattern in the active file. Returns list of {line, col, text}. |
| find_in_filesC | Search for pattern across project folders (or the supplied folder list). Skips .git, pycache, node_modules, .venv. Returns list of {path, line, match}. |
| get_syntaxesA | List all syntax definitions available in Sublime Text (name + path). |
| get_command_paletteA | List Command Palette entries from installed *.sublime-commands resources. Optional filters: package, command id, or caption substring. |
| get_commandsA | List runnable Sublime command ids from loaded command classes, optionally enriched with matching Command Palette entries from installed packages. |
| get_menu_itemsA | List installed menu items from *.sublime-menu resources. Optional filters: menu filename, caption substring, or command id substring. |
| get_active_panelA | Return the active panel id and, if it is an output panel, its content. |
| set_syntaxB | Set the syntax of the active file by name (case-insensitive partial match is fine). |
| get_encodingA | Return the character encoding of the active file. |
| set_encodingB | Set the character encoding of the active file (e.g. 'UTF-8', 'Western (Windows 1252)'). |
| get_scope_at_cursorA | Return the full syntax scope string at the cursor position. |
| get_word_at_cursorA | Return the word under the cursor and its line/col. |
| get_bookmarksA | Return all bookmarked positions in the active file. |
| get_line_countA | Return the total number of lines in the active file. |
| get_settingB | Get a Sublime Text setting by key. scope='view' (default) or 'window'. |
| set_settingB | Set a Sublime Text setting by key. scope='view' (default) or 'window'. |
| toggle_sidebarA | Show or hide the Sublime Text sidebar. |
| get_layoutA | Return the current window layout (groups, cells) and which files are in each group. |
| focus_groupA | Move focus to a pane group by 0-based index. |
| set_layoutB | Set the window pane layout. layout must be a ST layout dict with cols, rows, cells keys. |
| eval_pythonA | Execute arbitrary Python in Sublime Text's main thread. Locals: sublime, window, view, print. Returns captured stdout in 'output'. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/dpc00/sublime-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server