Compare builds
compare_buildsCompare two builds of a target. Always returns each region's old and new size; 'level' adds the changed sections, source files or symbols, sorted by size of change. Without 'base', the head is compared with the build it was compared with when it was uploaded: for a pull request's head commit that is the tip of the PR's base branch, so the result is the whole PR; for a pushed commit it is the branch's previous build, so the result is what that one commit did. With 'base_target', the base is a build of another target instead, to see which target already does without a symbol.
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": {
"project": "<project>",
"target": "<target>"
},
"name": "compare_builds"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | The older build, in the same forms. Default: the build 'head' was compared with when it was uploaded (for a pull request, the tip of its base branch); with 'base_target', the head of that target's default branch. | |
| head | No | The newer build: a full commit SHA, a SHA prefix (7+ characters), or a branch or tag name. Default: the head of the default branch. For a pull request, its head commit SHA. | |
| level | No | Detail to return (default 'regions'). 'symbols' and 'files' load full reports and are slower. | |
| limit | No | Maximum rows to return (default 50, max 200). | |
| region | No | Only this memory region, e.g. FLASH or RAM. | |
| target | Yes | Target name (see list_targets). | |
| project | Yes | The project: a public project's GitHub 'owner/repo' (no API key needed), or, with an API key, a project id or name from list_projects. | |
| section | No | Only this section, e.g. .text (sections and symbols levels). | |
| base_target | No | Compare with this other target of the project ('base' then names its build). | |
| name_contains | No | Only sections, files or symbols whose name contains this text (case-insensitive). |