klayout-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KLAYOUT_BIN | No | KLayout batch executable for DRC | klayout |
| KLAYOUT_MCP_ARTIFACT_ROOT | No | Root directory for runtime artifacts | <repo>/.artifacts |
| KLAYOUT_MCP_SESSION_TTL_SECONDS | No | Session inactivity timeout | 3600 |
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 |
|---|---|
| open_layoutA | Open a GDS or OASIS layout read-only and start a session. Call this first. The returned Args:
path: Absolute path to a |
| close_sessionB | Close a session and delete its artifact directory (renders, DRC output). Args:
session_id: Session returned by |
| list_cellsA | List cells in the layout hierarchy, sorted by name. Each entry has the cell bounding box in microns, whether it is a top cell, its direct child instance count, and its direct shape count. Args:
session_id: Session returned by |
| describe_cellA | Describe one cell: bounding box, child instances, text labels, and shapes per layer. Args:
session_id: Session returned by |
| list_layersA | List every layer in the layout with its layer/datatype, name, and shape count. Use the returned Args:
session_id: Session returned by |
| query_regionA | Return shapes, text labels, and child instances overlapping a box. Each returned shape has a session-stable Args:
session_id: Session returned by |
| measure_geometryA | Measure a value from shapes previously returned by Modes and the number of Args:
session_id: Session returned by |
| analyze_waveguideA | Analyze a path shape as a waveguide: width, length, orientation, and bend estimate. Args:
session_id: Session returned by |
| set_viewA | Set the session's default render view used by later Omitted arguments keep their current value. Changing Args:
session_id: Session returned by |
| render_viewA | Render layout geometry to a PNG and return its absolute path. Arguments given here also update the session's default view (see Args:
session_id: Session returned by |
| run_drc_scriptA | Run a KLayout DRC deck in batch mode against the session layout. The deck receives Args:
session_id: Session returned by |
| extract_markersA | Return the violation markers from a Args:
session_id: Session returned by |
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 12 tools
Most tools have clearly distinct purposes (session lifecycle, listing, querying, measuring, rendering, DRC), and descriptions clarify boundaries. Minor overlap exists between analyze_waveguide and measure_geometry's path_width/bend_radius_estimate modes, which could cause occasional misselection.
Every tool follows a consistent snake_case verb_noun pattern (open_layout, list_cells, query_region, render_view, extract_markers, etc.), with only minor multi-word variations like run_drc_script that still fit the convention. No style mixing.
12 tools is well-scoped for a read-only layout inspection/analysis server, with each tool covering a distinct capability from session management to DRC. No redundant or filler tools.
The surface covers the full read-only workflow: open/close session, inspect cells and layers, query regions, measure geometry, render views, and run DRC with marker extraction. Edit/write operations are intentionally absent given the read-only design, and there is no way to list past DRC runs, but core workflows are complete.