Skip to content

terminal_render

MCP tools › Run, test and tasks

Interpret output with escape sequences as an xterm-compatible terminal shows it: visible text, cursor, title, alternate-screen state and scrollback; with find, the highlighted matches; links on visible rows (URLs, file paths, OSC 8) and reported_dir from OSC 7; mouse mode and encoding, plus the bytes the given mouse events would send; keyboard modes; and answers to cursor-position, status and device-attribute queries. Rows and columns 0-based, end columns exclusive.

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

Capabilityexecution.terminal_render
AreaRun, test and tasks
Accessreads only
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
outputrequiredstringTerminal output including escape sequences (as text; \u001b for ESC).
rowsintegerRows (default 24).minimum 0
colsintegerColumns (default 80).minimum 0
mousearray of objectMouse events to encode after the output, as the terminal would report them to the program (SPEC-0118).default []
mouse[].actionrequiredstringpress, release or move.
mouse[].buttonrequiredstringleft, middle, right, wheel_up, wheel_down or none.
mouse[].rowrequiredintegerRow, 0-based.minimum 0
mouse[].colrequiredintegerColumn, 0-based.minimum 0
mouse[].shiftbooleanShift held.default false
mouse[].altbooleanAlt held.default false
mouse[].ctrlbooleanControl held.default false
findstringText to find in history and screen as the terminal's find field does (SPEC-0206 v2 behaviour 7); the answer lists matches.
match_casebooleanCompare letters with their case (default false).

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 terminal_render '{"output":"<string>"}'
Input schema as JSON
{
"properties": {
"output": {
"description": "Terminal output including escape sequences (as text; `\\u001b` for ESC).",
"type": "string"
},
"rows": {
"description": "Rows (default 24).",
"type": [
"integer",
"null"
],
"minimum": 0
},
"cols": {
"description": "Columns (default 80).",
"type": [
"integer",
"null"
],
"minimum": 0
},
"mouse": {
"description": "Mouse events to encode after the output, as the terminal would report them to the program\n(`SPEC-0118`).",
"type": "array",
"items": {
"$ref": "#/$defs/TerminalMouseArg"
},
"default": []
},
"find": {
"description": "Text to find in history and screen as the terminal's find field does (`SPEC-0206` v2\nbehaviour 7); the answer lists `matches`.",
"type": [
"string",
"null"
]
},
"match_case": {
"description": "Compare letters with their case (default false).",
"type": [
"boolean",
"null"
],
"default": null
}
},
"$defs": {
"TerminalMouseArg": {
"description": "One mouse event for `terminal_render`.",
"type": "object",
"properties": {
"action": {
"description": "`press`, `release` or `move`.",
"type": "string"
},
"button": {
"description": "`left`, `middle`, `right`, `wheel_up`, `wheel_down` or `none`.",
"type": "string"
},
"row": {
"description": "Row, 0-based.",
"type": "integer",
"minimum": 0
},
"col": {
"description": "Column, 0-based.",
"type": "integer",
"minimum": 0
},
"shift": {
"description": "Shift held.",
"type": "boolean",
"default": false
},
"alt": {
"description": "Alt held.",
"type": "boolean",
"default": false
},
"ctrl": {
"description": "Control held.",
"type": "boolean",
"default": false
}
},
"required": [
"action",
"button",
"row",
"col"
]
}
},
"required": [
"output"
],
"type": "object"
}