Skip to main content
Glama

parse_map

Parse GNU ld, Keil, or IAR .map files to report Flash/RAM segment usage, symbol tables, and suspicious large symbols. Use it to find what is consuming RAM or stack.

Instructions

解析 .map 文件:段占用(Flash/RAM)、符号表、可疑大符号(查大数组/大缓冲)。

支持 GNU ld / Keil / IAR 三种格式,自动识别;认不出会明说,不猜。 parse_map("build/app.map") 查"RAM 怎么爆了""哪个大数组吃栈"时用。结果里的符号大小若是「推断」值, 表示该 map 不记 size,大小由相邻符号地址差推出(可能偏大)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
top_nNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses auto-detection across GNU ld / Keil / IAR, that unrecognized input is reported rather than guessed, and the crucial 'inferred' symbol-size caveat (may be overestimated). It omits any note on performance or file-size limits but the interpretive caveat is genuinely valuable.

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

Conciseness4/5

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

Front-loads purpose, then format support, then a copyable example, then usage, then a caveat. Dense but every line contributes; the embedded code example is slightly awkward as prose but earns its place.

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?

An output schema exists, so return-value formatting need not be explained. The description still covers supported formats, detection failure behavior, usage context, and result interpretation, leaving only the undocumented top_n parameter as a gap.

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 shows a path example (parse_map("build/app.map")), which helps for the required param, but top_n is never explained — its meaning (top N largest symbols?) and role must be guessed from the title alone.

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 (parse .map file) and enumerates the concrete outputs: section occupancy (Flash/RAM), symbol table, and suspicious large symbols. An agent can immediately distinguish this from the other 60+ analysis tools, none of which target map files.

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 use-case framing in "when RAM blew up / which big array eats stack," which routes the agent correctly. It stops short of naming alternatives or stating when NOT to use it (e.g., vs sibling symbol_lookup), so it does not reach a 5.

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