Skip to content

profile_last

MCP tools › Run, test and tasks

The workspace's last profile (CPU, memory or attached, from the Profiler tool window, profile_run or profile_attach), read from .ferris-idea/profiles/last.json without running anything: engine, unit (samples = milliseconds, or seconds), command, exit code, duration, notes, the 25 hottest functions by self cost with file and line, and the pruned call tree. Nodes carry in_project; only_project and file narrow to the project's code and add per-line costs; for Java profiles time: total counts wall time and events: true adds the recording's events next to the per-thread timeline.

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

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

Arguments

ArgumentTypeDescription
min_percentnumberSmallest share of the run a call tree node must have, in percent (default 1).
max_depthintegerDeepest call tree level returned (default 16, at most 64).minimum 0
only_projectbooleanProject code only (default false).
filestringWorkspace-relative file: add its per-line costs as lines.
timestringcpu (default) or total (Java only).
eventsbooleanAdd the recording's events, at most 500 (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 profile_last
Input schema as JSON
{
"type": "object",
"properties": {
"min_percent": {
"description": "Smallest share of the run a call tree node must have, in percent (default 1).",
"type": [
"number",
"null"
]
},
"max_depth": {
"description": "Deepest call tree level returned (default 16, at most 64).",
"type": [
"integer",
"null"
],
"minimum": 0
},
"only_project": {
"description": "Project code only (default false).",
"type": [
"boolean",
"null"
]
},
"file": {
"description": "Workspace-relative file: add its per-line costs as `lines`.",
"type": [
"string",
"null"
]
},
"time": {
"description": "`cpu` (default) or `total` (Java only).",
"type": [
"string",
"null"
]
},
"events": {
"description": "Add the recording's events, at most 500 (default false).",
"type": [
"boolean",
"null"
]
}
}
}