Skip to main content
Glama

list_layers

Retrieve every layer in a KLayout layout with its layer/datatype, name, and shape count. Use these pairs as layer filters in other KLayout tools.

Instructions

List every layer in the layout with its layer/datatype, name, and shape count.

Use the returned {layer, datatype} pairs as layer filters in other tools.

Args: session_id: Session returned by open_layout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the returned content and the filter usage, but says nothing about scope (whole layout vs. current view), ordering, pagination/limits, or what happens with an invalid/expired session_id.

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?

Front-loaded with the core action, then the output usage hint, then the argument note. No filler; every sentence adds information.

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

Completeness4/5

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

An output schema exists, so return-value explanation is not strictly required, and the description covers purpose, argument provenance, and downstream use. It could still note scope/ordering for a listing tool, but nothing essential to correct invocation is missing.

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

Parameters4/5

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

Schema coverage is 0% and the single parameter has no schema description, so the description must compensate — it does by naming session_id's origin ('Session returned by `open_layout`'), giving the agent a concrete way to obtain it. No format or validation detail beyond that.

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?

States a specific verb and resource ('List every layer in the layout') plus the exact returned fields (layer/datatype, name, shape count). This clearly distinguishes it from siblings like list_cells and describe_cell, which operate on cells rather than layers.

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?

It explains downstream usage ('use the returned {layer, datatype} pairs as layer filters in other tools') and implies this is the enumeration step, but never states when to prefer it over alternatives such as query_region or describe_cell, nor any preconditions beyond having a session.

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