Skip to main content
Glama
htminuslab

visualizer-mcp

by htminuslab

vcc_force

Force a signal to a specific value, with optional timing, to override or set initial conditions in HDL simulation.

Instructions

Force signal to value (e.g. force sim.top.rst 1 0; force sim.top.clk 0 50ns).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signalYes
valueYes
timeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `vcc_force` tool handler. Wraps the Visualizer 'force' Tcl command to force a signal to a given value, optionally at a specific simulation time. Uses `shlex.quote` for safe shell quoting and delegates to the generic `vcc_eval` tool.
    @mcp.tool()
    async def vcc_force(signal: str, value: str, time: str | None = None) -> dict[str, Any]:
        """Force `signal` to `value` (e.g. force sim.top.rst 1 0; force sim.top.clk 0 50ns)."""
        suffix = f" {time}" if time else ""
        return await vcc_eval(
            f"force {shlex.quote(signal)} {shlex.quote(value)}{suffix}"
        )  # type: ignore[misc]
  • Tool registration via the `@mcp.tool()` decorator, which registers `vcc_force` as an MCP tool on the FastMCP server instance.
    @mcp.tool()
  • Input schema for vcc_force: `signal` (str, required), `value` (str, required), `time` (str, optional). Returns a dict with keys 'ok' and 'result' or 'ok' and 'error'.
    async def vcc_force(signal: str, value: str, time: str | None = None) -> dict[str, Any]:
  • The underlying `vcc_eval` helper that `vcc_force` delegates to. It sends the Tcl command to the Visualizer VCC server and handles error cases (command error, not running, connection closed, timeout).
    @mcp.tool()
    async def vcc_eval(tcl: str, timeout_s: float | None = None) -> dict[str, Any]:
        """Send any Tcl command to Visualizer's command interpreter.
    
        This is the escape hatch — every Visualizer Tcl command (run, step,
        wave add, force, examine, env, ...) can be sent through this tool.
        """
        try:
            result = await session.eval(tcl, timeout_s=timeout_s)
            return {"ok": True, "result": result}
        except VccCommandError as e:
            return {"ok": False, "error": e.server_message}
        except VisualizerNotRunning as e:
            return {"ok": False, "error": str(e)}
        except VccConnectionClosed as e:
            return {"ok": False, "error": f"connection_closed: {e}"}
        except asyncio.TimeoutError:
            return {"ok": False, "error": "timeout"}
Behavior2/5

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

No annotations provided, so description carries full burden. It does not disclose that forcing overrides normal simulation behavior, whether it is temporary, or any side effects like destroying prior state. The term 'force' implies mutation but lacks detail on impact.

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?

Extremely concise: one sentence plus example with no redundant information. Every word earns its place.

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?

Given the tool's simplicity and presence of an output schema, the description covers the core action but omits context on signal path conventions, time format rigor, and interaction with other simulation states. Adequate but not thorough.

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 0% schema coverage, description adds meaning via example: signal is a path, value is a value like 0/1, time is optional and appears in units like '0' or '50ns'. However, the format of time is not explicitly documented, and the schema properties lack 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 the action 'Force `signal` to `value`' with an example, making the verb and resource explicit. It distinguishes from siblings like vcc_examine (read) and vcc_eval, as forcing is a distinct write operation.

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

Usage Guidelines2/5

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

No guidance on when to use this tool vs alternatives like vcc_eval or vcc_connect. The description does not mention when not to use it or provide context for prerequisite conditions.

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/htminuslab/visualizer-mcp'

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