Skip to main content
Glama

xdc_auto_fix

Automatically fix missing IOSTANDARD and clock period constraints in XDC files. Preview changes with dry-run, then apply with automatic backup.

Instructions

自动修复 XDC 文件中能安全自修的问题(MISSING_IOSTANDARD / CLOCK_NO_PERIOD)。

默认 dry_run=True 只预览补丁,确认无误后调用 dry_run=False 实际写回。 写回前会为每个被修改文件生成同名 .bak 备份;注意 .bak 只保留最近一次 修改前的版本(再次写回会覆盖上一次的 .bak,与 sed -i.bak 同语义)。

只修这两类问题(其他需要人工判断):

  • MISSING_IOSTANDARD —— 在 PACKAGE_PIN 行之后插入 IOSTANDARD 语句

  • CLOCK_NO_PERIOD —— 仅当 board 已知时补 -period;未知板跳过

绝对不碰:

  • PIN_CONFLICT / DUPLICATE_PORT / PIN_CONFLICT_CROSS_FILE(冲突问题必须人改)

Args: xdc_paths: XDC 文件路径列表。不传则从当前 session 的项目里抓。 board: 板卡名,影响默认 IOSTANDARD 和时钟周期。支持: basys3 / nexys-a7 / arty-a7 / zybo / kc705。留空用 LVCMOS33 兜底。 dry_run: True(默认)只输出补丁预览不改文件;False 实际写回。 session_id: 目标会话 ID(仅在不传 xdc_paths 时使用)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardNo
dry_runNo
xdc_pathsNo
session_idNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully covers the tool's behavior: dry-run preview mode, backup creation per file, .bak only keeping the latest version before write-back (with sed -i.bak semantics), insertion logic for IOSTANDARD after PACKAGE_PIN, and skipping CLOCK_NO_PERIOD when the board is unknown. It also states which issue types are intentionally not handled, making side effects and boundaries explicit.

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?

The description is well-structured with a main purpose, operational notes, explicit inclusion/exclusion lists, and a parameter breakdown. It is concise for the complexity involved, with every sentence contributing to understanding or safe usage. The use of bullets and clear headings (e.g., '只修', '绝对不碰') aids readability.

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?

Given the tool's complexity (mutating files, multiple parameters, safety implications) and lack of annotations, the description is exceptionally complete. It explains side effects (backup, overwrite), edge cases (unknown board), and provides a safe workflow. The presence of an output schema means return-value details are not required, and the description covers all other necessary contextual information.

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 coverage is 0%, but the description thoroughly explains every parameter: xdc_paths (list, defaults to session project), board (supported values and fallback to LVCMOS33), dry_run (preview vs write-back), and session_id (used only when xdc_paths is omitted). It adds default values and cross-parameter dependencies, fully compensating for the lack of schema descriptions.

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?

The description clearly states it automatically fixes self-safely fixable issues in XDC files, specifically MISSING_IOSTANDARD and CLOCK_NO_PERIOD. It distinguishes itself from sibling tools by explicitly limiting its scope to these two issue types and stating it never touches conflict-related problems (PIN_CONFLICT, DUPLICATE_PORT, etc.), which require manual intervention.

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?

The description provides explicit when-to-use guidance: it only fixes the two listed issue types and absolutely avoids conflict categories. It also gives a clear workflow: use dry_run=True to preview, then dry_run=False to apply. However, it does not explicitly name sibling tools as alternatives (e.g., xdc_lint for broader linting), so it misses the 'alternatives' part of the top tier.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mapleleavessssssss-wq/vivado-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server