Explain Function
explain_functionGet detailed timing data for any function, including self-time, total-time, callers, and callees, to pinpoint why it runs slowly.
Instructions
Returns detailed timing info for a specific function: self-time, total-time, callers, and callees. Use this to understand why a function is slow.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"profileId": "<profileId>",
"functionName": "<functionName>"
},
"name": "explain_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profileId | Yes | Profile ID returned by load_profile | |
| contextLines | No | Only used with includeSource: minimum lines of padding around the declaration and hot lines (default: 10) | |
| functionName | Yes | Exact function name to look up | |
| includeSource | No | When true, include annotated source code lines with per-line tick counts (default: false) |