MCP server
reticle-mcp exposes the frozen agent command surface to a language model over the
Model Context Protocol, so a model host can drive
Reticle with the same operations the agent harness uses, without any
custom glue.
Tools from the frozen surface
Every AgentCommand variant becomes one MCP tool with a JSON input
schema and a model-facing description, generated from the frozen types rather than
hand-maintained, so the tool set cannot drift from what the engine actually accepts.
That is 30 command tools (create a cell, add a rectangle, run DRC, check intent,
export, render, the editor operations below, and so on), plus six generator tools
(one per built-in layout generator, below), plus three read-only context tools the
model uses to observe state before it acts. 39 tools in total, matching what a live
tools/list call reports:
get_technology_rulesthe active technology’s layers and DRC rules;get_document_summarythe current cells, shape counts, and top cells;get_render_regiona PNG of a region, so the model can look at what it has drawn.
Editor operations
Five of the command tools lift the in-app editor’s productivity operations to the agent surface, so a model can restructure geometry the way a person would with the Operations panel (ADR 0031):
boolean_combineunion, intersection, difference, or xor over two or more shapes, writing the result to a target layer and deleting the inputs;align_shapesline a set of shapes up (left, right, top, bottom, or centered) within their combined bounding box;distribute_shapesrespace three or more shapes so adjacent gaps are equal;offset_shapesgrow or shrink shapes by a database-unit offset;build_via_stackplace a square cut plus a lower and upper enclosure sized from the technology’s enclosure rules.
They share the geometry engine with the editor (reticle-geometry’s robust integer
booleans and offsetting), so an agent-built union and a hand-built one are bit-for-bit
identical.
Generator tools
The built-in reticle-gen
layout generators are each advertised as their own tool, named for the generator id,
so a model calls via_farm or guard_ring directly with typed, ranged parameters
instead of assembling an opaque params blob for a generic run_generator tool (ADR
0049).
Every generator tool takes the target cell plus the generator’s own parameters, and
maps to a RunGenerator command when applied:
guard_ringa closed conductor ring around a rectangular region, optionally lined with a row of substrate-tap contacts;via_farman array of cuts between two conductor layers, covered by enclosing lower and upper plates;pad_ringa die-size-aware ring of I/O pad structures around the die edge, with corner keep-outs and reinforced power pads;seal_ringa continuous stacked-metal-plus-cut barrier around the die edge;filla regular grid of fill tiles over a region, approaching a target coverage density;test_structurea probe-able structure (van der Pauw cross, contact chain, comb, or serpentine), selected by a parameter.
Each is DRC-clean by construction against the SKY130 subset the generators target. Every generator tool’s schema (ranges, defaults, enums) is converted directly from the generator’s own parameter schema, so it cannot drift from what the generator actually accepts.
Transport
The server speaks newline-delimited JSON-RPC 2.0 on stdin and stdout, matching the
MCP stdio transport, and is hand-rolled over serde_json rather than pulling in an
MCP framework, keeping the dependency surface small and the behavior explicit (ADR
0005). A per-session command budget bounds how many mutating tools a session may
apply; once exhausted, further command tools are rejected, so a host cannot drive an
unbounded number of edits.
Running it
The reticle-mcp binary is a stdio server: a model host launches it and speaks
JSON-RPC over the pipe. It is registered alongside the project’s reticle-dev
development server in .mcp.json. An integration test drives all 39 tools over a
real stdio subprocess and asserts each one, so the wire contract is covered end to
end.
See ADR 0005 and the agent chapter for the command surface these tools mirror.