Skip to main content
Glama

format_hdl

Format Verilog, SystemVerilog, or VHDL source code using industry-standard tools to ensure consistent style and readability in FPGA development workflows.

Instructions

Format HDL source code and return the result. Verilog/SystemVerilog: uses verible-verilog-format. VHDL: uses vsg (pip install vsg). Returns the formatted code and whether it changed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesHDL source code to format
languageNoHDL language variantverilog
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal that the tool returns both formatted code and a change indicator, which is useful behavioral context. However, it doesn't mention error handling, performance characteristics, or any limitations of the underlying formatters (verible-verilog-format and vsg).

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 perfectly concise with three sentences that each earn their place: the core functionality, the specific formatters used for different languages, and the return values. It's front-loaded with the primary purpose and wastes no words.

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?

For a relatively simple formatting tool with good schema coverage but no output schema, the description provides adequate context. It explains what the tool does, mentions the specific formatters, and describes the return values. However, without an output schema, it could benefit from more detail about the return format structure.

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

Parameters3/5

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

With 100% schema description coverage, the input schema already documents both parameters thoroughly. The description adds minimal value beyond the schema by mentioning that 'code' is 'HDL source code to format' (which the schema already states) and implying the language parameter determines which formatter is used. This meets the baseline expectation when schema coverage is high.

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 the specific action ('Format HDL source code'), the resource involved ('HDL source code'), and the outcome ('return the result'). It distinguishes this tool from siblings like lint_hdl, simulate, and synthesize by focusing specifically on code formatting rather than analysis, verification, or synthesis.

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 clear context about when to use this tool (formatting HDL code) and implicitly distinguishes it from siblings by mentioning specific formatters for different languages. However, it doesn't explicitly state when NOT to use it or name specific alternative tools for related tasks like linting or synthesis.

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/bard0-design/fpgaZeroMCP'

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