Skip to main content
Glama
lazyverilog

LazyVerilog MCP

Official
by lazyverilog

apply_code_action

Apply a named SystemVerilog code action at a specified line in a file, with optional preview to inspect the diff before writing.

Instructions

Run the code action named title (from code_actions, prefix match ok) at line of file.

Input Schema

NameRequiredDescriptionDefault
fileYesSystemVerilog file path, absolute or relative to the workspace root
lineYes1-based line number
titleYes
symbolNoSymbol text as written on that line
previewNoReturn the diff without writing (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.8/5.0
Behavior3/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. 'Run' implies a mutating operation, and the schema's `preview` flag documents a write-free mode, but the description never states that files on disk are modified by default, nor what happens on an ambiguous prefix match or when no action is available at that line.

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?

A single sentence with the action, the discovery source, and the matching rule all front-loaded; nothing is wasted and there is no preamble.

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

Completeness3/5

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

For a five-parameter mutation tool with no annotations and no output schema, the description omits what comes back (the resulting edit, a diff when previewing, or an error) and whether multiple prefix matches are rejected. It covers the call mechanics adequately but not the outcome.

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

Parameters4/5

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

Schema coverage is 80% and mostly self-documenting, so the baseline is 3. The description earns above that by supplying semantics the schema lacks for an undescribed parameter: `title` is matched by prefix against the `code_actions` output, and its value must be paired with a 1-based line in the file.

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

Purpose4/5

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

States a specific verb ('Run') plus resource ('the code action'), and anchors it to a named sibling ('from code_actions'), so the agent knows this is the execution half of a discover-then-apply pair. It does not explicitly distinguish itself from action-applying siblings such as rename_symbol, which is why it stops short of 5.

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 a clear workflow cue: the `title` value must come from `code_actions`, and prefix matching is acceptable. There is no guidance on when to avoid this tool (e.g. use rename_symbol directly, or format_file for formatting-only actions), so it lacks explicit exclusions.

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