Skip to main content
Glama
geniuskey

klayout-draw-mcp

by geniuskey

run_script

Execute Python scripts with full access to klayout.db for advanced layout editing and creation. Captures stdout output and supports session rebinding.

Instructions

Execute Python with klayout.db available (advanced).

Injected names: db (klayout.db), klayout, session (current LayoutSession or None), LayoutSession. stdout is captured and returned. A script may rebind session to a new LayoutSession to make it the active layout. Runs locally in-process with full Python access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description discloses important behavioral traits: injected names (db, klayout, session), stdout capture, rebinding session possibility, and local in-process execution with full Python access. This goes beyond what annotations provide (none given), though it does not cover error handling or safety implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (5 sentences), front-loaded with the core purpose, and each sentence adds distinct value (injected names, stdout capture, session rebinding, execution context). No redundant or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is relatively complex (script execution with injected environment), but the description omits return value details despite the presence of an output schema. It also does not address error handling or timeouts. Given the one-parameter simplicity, it is mostly complete but lacks explicit output specification.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage for its single parameter 'code'. The description does not explicitly define the parameter, but context implies that 'code' is the Python script to execute. Some additional guidance (e.g., expected format, string length) would improve clarity.

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?

The description clearly states 'Execute Python with klayout.db available (advanced)', which precisely identifies the tool's verb (execute) and resource (Python script with klayout.db). It distinguishes itself from sibling tools that are layout modification operations (e.g., add_box, add_polygon), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for running Python scripts with special injected names, but it does not explicitly state when to use this tool versus alternatives. The term 'advanced' suggests caution, but no when-not or alternative tools are mentioned. Usage context is implied but not fully explicit.

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

Install Server

Other Tools

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