suggest_memoization
Analyze React profiling data to identify components with wasteful re-renders and get concrete React.memo suggestions.
Instructions
Analyzes the profiling data and returns concrete memoization suggestions. Currently detects React.memo candidates: components with spurious renders above the wasted ms threshold. Each suggestion explains why the component re-renders unnecessarily and what to do about it.
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": "suggest_memoization"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile_path | Yes | Absolute path to the React DevTools Profiler export (.json) | |
| min_wasted_ms | No | Only suggest for components wasting more than this many ms total (default: 0) |