Skip to main content
Glama

pio_size_report

Analyze built firmware to identify flash and RAM usage by source file and symbol. Use the report to locate large components and reduce firmware size for microcontroller boards.

Instructions

Explain where flash and RAM go in the built firmware.elf: text/data/bss totals with percent of the board's flash and RAM, loaded sections classified as flash/ram, the biggest symbols (demangled, with file:line), and per-source-file totals. Use it to shrink firmware on purpose: drop the largest fonts/tables, remove unused features, tune build flags. Run pio_build first; filter is a regex applied to symbol names and file paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNo
topNo
filterNo
project_dirNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden; it discharges it by specifying what the report contains, that symbols are demangled with file:line, and that `filter` is a regex over symbol names and file paths. It is clearly a read-only analysis tool, which is implied rather than explicitly stated, and the prerequisite plus output composition are disclosed. An explicit 'does not modify anything' statement would be the only improvement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: purpose and outputs, use case, then prerequisite plus filter semantics. The verb and resource are front-loaded, and no words are wasted restating the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema covers return structure, so the description correctly focuses on purpose, output composition, use case, prerequisite, and filter behavior. The only real gaps are the three optional parameters (`env`, `top`, `project_dir`), which are non-fatal since all are optional with defaults but leave the agent to guess at report scoping.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate; it explains `filter` precisely ('a regex applied to symbol names and file paths'). However, `env`, `top`, and `project_dir` receive no semantic explanation beyond their property names, and `top`'s default of 25 is left for the agent to infer as the ranked-list length.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Explain where flash and RAM go in the built firmware.elf') and enumerates the exact report contents (text/data/bss totals, flash/ram sections, demangled symbols with file:line, per-file totals). None of the sibling tools cover size analysis, so it is cleanly differentiated without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use guidance ('Use it to shrink firmware on purpose: drop the largest fonts/tables, remove unused features, tune build flags') and a hard prerequisite ('Run pio_build first'). It does not name alternatives or exclusions, but among the siblings (build, upload, monitor, pkg) there is no close alternative that requires ruling out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.