Skip to main content
Glama
siliconsmith-mcp

siliconsmith-mcp

by RFingAdam

write_test

Destructive

Writes or replaces a cocotb 2.x test file under test/ using full UTF-8 content, then syntax-checks it and reports file:line:col errors.

Instructions

Write a cocotb 2.x test file under test/ (test/**/*.py, but not conftest.py), replacing the whole file. Always send the full new content. The starter test is test/test.py. cocotb 2.x idioms: Clock(dut.clk, 10, unit="ns"), int(dut.x.value), cocotb.start_soon. Give each test a docstring line such as 'Covers: R1' naming the requirement ids from spec.yaml. Content must be UTF-8 text of at most 256 KiB. The file gets a syntax check (it is never run here); it is saved even when the check fails, and then ok is false with file:line:col and the message.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project": "<project>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
contentYes
projectYes

Output Schema

NameRequiredDescriptionDefault
okYes
detailsNo
summaryYes
artifactsNo
next_hintsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Going well beyond the destructiveHint=true annotation, it discloses that the whole file is replaced and full content is mandatory, that content is capped at 256 KiB UTF-8, that a syntax check runs but the test is never executed, that the file is persisted even on check failure, and that failure returns ok=false with file:line:col and a message. That is exactly the side-effect detail an agent needs before a destructive write.

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?

Front-loads the action and scope, then packs constraints, idioms, and failure behavior into a tight block with no filler. The inline cocotb 2.x idiom examples are mildly verbose but directly prevent malformed output, so they justify their space.

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?

For a destructive three-parameter writer, it covers scope, replacement semantics, size/encoding limits, validation behavior, and failure signaling. An output schema exists, so the description need not detail return values further, and it already names the ok/file:line:col failure fields.

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 description coverage is 0%, so the description must carry the load; it constrains path to test/**/*.py excluding conftest.py and specifies content must be full UTF-8 text under 256 KiB. The project parameter is never explained, leaving one of three required parameters undocumented.

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?

States a specific verb and resource ('Write a cocotb 2.x test file under test/') plus the path restriction (test/**/*.py, not conftest.py) and the default starter file test/test.py. This clearly separates it from write_rtl, write_spec, and other sibling writers.

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?

Explains the context of use (cocotb 2.x test files in test/) and the required per-test docstring convention tying tests to requirement ids from spec.yaml, plus the note that the starter test is test/test.py. It never names an alternative tool or states when not to use it, so it stops short of full routing guidance.

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