Skip to main content
Glama

设置/切换当前调试符号文件

set_symbol_file
Idempotent

Switch runtime debug symbol file to fix symbol binding errors from the wrong .axf. Accepts .axf (DWARF line info) or .map (symbol addresses); returns symbol count or clear error.

Instructions

运行时切换调试符号文件,解决符号绑定错误(find_symbol/get_current_location/断点行号解析到错误的 .axf)问题。path 支持 .axf(完整 DWARF 行号/局部变量)或 .map(函数/全局符号地址,无行号)。加载成功返回符号条目数;失败给出明确错误(文件不存在/无DWARF/格式不支持)。注意:建议 AI 落地后先 list_symbol_projects 查看候选,再 set_symbol_file 切到当前正在调试的固件符号,避免符号漂移误判。 【参数】必填: path;可选: 无 【调用示例】{"path": "path/to/firmware.axf"} 【风险】中——会改变目标状态或占用共享资源(调试态/串口/Keil 实例),必要时可回退。 【参数别名】path ← axf/axf_path/file/symbol_file。规范名以上方【参数】行为准;未列出的参数名会被拒绝,不会静默忽略

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.7/5.0
Behavior4/5

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

注释提供 readOnlyHint=false、idempotentHint=true、destructiveHint=false,描述补充了风险'会改变目标状态或占用共享资源(调试态/串口/Keil 实例)',并说明可回退,增加了注释之外的上下文。还说明了成功/失败返回行为,但可进一步详述具体错误类型。

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?

描述信息密度高,开头即点明目的,随后提供参数、示例、风险和别名,结构清晰。虽然长度较长,但每部分均有价值,没有冗余。略微分散但整体组织良好。

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

Completeness5/5

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

鉴于工具涉及状态变更和资源占用,描述覆盖了使用场景、参数语义、风险、回退方式以及返回内容,结合输出 schema 和注释,信息完整。没有遗漏关键事项。

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

Parameters5/5

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

schema 覆盖率为 0%,但描述详细解释了 path 参数支持 .axf 和 .map 的语义差异,以及支持的文件格式细节,远超 schema 仅定义类型。还列出了参数别名,帮助理解参数用途。

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?

描述明确指出该工具用于'运行时切换调试符号文件',并具体说明解决符号绑定错误问题,动词和资源清晰。与兄弟工具如 list_symbol_projects 有明显区分,后者用于查看候选,而本工具用于切换,目的明确。

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

Usage Guidelines5/5

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

描述明确建议先使用 list_symbol_projects 查看候选,再使用本工具切换,并说明避免符号漂移的时机。还提供了 path 支持 .axf 或 .map 的格式选择,以及调用示例,使用指南非常具体。

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