analyze_profile
Analyze a py-spy profile to identify the hottest frames, helping pinpoint performance bottlenecks in Python processes.
Instructions
Analyze an existing py-spy profile and return the hottest frames.
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": {
"profile_path": "<profile_path>"
},
"name": "analyze_profile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | Number of top frames to return (default 10). | |
| profile_path | Yes | Path to a speedscope JSON (.json) or raw (.txt) profile. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |