Suggest Optimizations
suggest_optimizationsAnalyze CPU profiles to get structured optimization suggestions for hot functions, detecting expensive patterns like recursion, high fan-in, and dominant callers.
Instructions
Analyzes the profile and returns structured optimization suggestions for the hottest functions. Detects high fan-in, recursion, dominant callers, V8-specific patterns, always reports CPU self-time cost for expensive functions, and deduplicates functions split across multiple call sites.
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>"
},
"name": "suggest_optimizations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of functions to analyze (default: 5) | |
| profileId | Yes | Profile ID returned by load_profile |