klayout-draw-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| 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 | |
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/geniuskey/klayout-draw-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server