klayout-draw-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| new_layoutA | Start a new in-memory layout to draw into. top_cell: name of the top cell. dbu: database unit in micrometers (0.001 = 1 nm grid). Resets any previous in-memory layout. |
| add_boxC | Add a rectangle (micrometers) on GDS layer/datatype. |
| add_polygonC | Add a polygon from a list of [x, y] vertices (micrometers). |
| add_pathC | Add a path: centerline [x, y] points (micrometers) with the given width. |
| add_labelC | Add a text label at (x, y) micrometers. |
| create_cellA | Create (or select) a cell and make it the active drawing target. Subsequent add_box / add_polygon / add_via / add_wire / place_cell calls go into
this cell. Use it to build a reusable library cell, then |
| use_cellB | Switch the active drawing cell to an existing cell (e.g. the top cell). |
| place_cellB | Place an instance (or nx*ny array) of orient: r0/r90/r180/r270 (rotation) or m0/m90/... (mirror + rotation). For an array, dx/dy are the column/row pitches in micrometers. Coordinates in um. |
| add_viaA | Add a via (cut array + enclosing metal on both layers) centred at (x, y). Builds a rows*cols array of cuts (cut_size, spaced by cut_space) on |
| add_wireA | Add a Manhattan wire: routes through |
| layout_infoA | Report the current layout: top cell, dbu, layers, bbox, shape count. |
| save_gdsA | Write the current layout to a file (.gds/.oas by extension). Optionally open it in the editor. |
| open_layoutB | Open an existing layout file in KLayout (viewer mode). |
| open_editorA | Open KLayout in editor mode (-e). With a file: edit it. Without: a blank layout to draw. |
| load_gdsA | Load an existing GDS/OASIS file into the active session for editing. After loading, keep adding shapes (add_box / add_polygon / ...), inspect or
DRC-check it, then save_gds() to write it back. |
| inspect_gdsA | Inspect a layout: per-layer shape count, area and bbox, plus the cell list. With |
| drc_checkA | Run simple DRC rules against a layout and report violations. Operates on {"type": "spacing", "layer": L, "datatype": D, "min": um} {"type": "width", "layer": L, "datatype": D, "min": um} {"type": "overlap", "layer": L, "datatype": D, "layer2": L2, "datatype2": D2} {"type": "separation", "layer": L, "datatype": D, "layer2": L2, "datatype2": D2, "min": um} {"type": "enclosure", "layer": L, "datatype": D, "layer2": L2, "datatype2": D2, "min": um} "spacing" is min space within a layer; "width" is min feature width;
"overlap" flags any intersection between two layers (forbidden overlap);
"separation" is min space between two layers; "enclosure" requires layer2 to
surround layer by min. Up to |
| run_scriptA | Execute Python with Injected names: |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
Each tool has a clearly distinct purpose: shape creation (box, label, path, polygon, via, wire), cell management (create_cell, use_cell, place_cell), layout I/O (load_gds, save_gds, new_layout, inspect_gds, layout_info), DRC checking, editor opening, and scripting. No ambiguity between tools.
All tool names follow a consistent verb_noun snake_case pattern (e.g., add_box, load_gds, inspect_gds). No mixed conventions or irregular naming.
18 tools are well-scoped for a GDS layout server, covering drawing, cell hierarchy, file operations, inspection, DRC, and scripting without being excessive or overly sparse.
The tool set covers the main layout workflow: creation, cell management, file operations, DRC, and scripting. Minor gaps like editing or deleting existing shapes are absent, but the core functionality is complete.