Skip to content

highlight_file

MCP tools › Code insight and refactoring

Syntax highlighting tokens of a workspace file (Tree-sitter): 0-based line, start and end character (Unicode scalar values) and kind such as keyword, string, comment, function, type. A .sql file is read in its dialect (its data source's, else the one its path names, else PostgreSQL): comments, strings, quoted names, variables, separators such as GO and the dialect's keywords. Optionally limited to a line range.

Its results carry text from files, language_server: the client is told to treat that as data, never as instructions.

Capabilitycode.highlight_file
AreaCode insight and refactoring
Accessreads only
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative file path.
start_lineintegerFirst 0-based line (default 0).minimum 0
end_lineintegerLast 0-based line, inclusive (default: last line).minimum 0

Call it from a shell

ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.

Terminal window
ferris-idea call ~/my-project highlight_file '{"path":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Workspace-relative file path.",
"type": "string"
},
"start_line": {
"description": "First 0-based line (default 0).",
"type": [
"integer",
"null"
],
"minimum": 0
},
"end_line": {
"description": "Last 0-based line, inclusive (default: last line).",
"type": [
"integer",
"null"
],
"minimum": 0
}
}
}