Skip to main content
Glama
mayjack0312
by mayjack0312

eda_pcb_layer_get_current_layer

Get detailed properties of the currently active PCB layer. Use this to identify which layer is selected and access its attributes for design context.

Instructions

pcb_Layer.getCurrentLayer() -> Promise<IPCB_LayerItem | undefined> 获取当前图层的详细属性 remarks: ADD since EDA v4.2 returns: 当前图层的详细属性,无激活层或无 PCB 画布时返回 undefined

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo按官方签名顺序排列的JSON参数数组
windowIdNo目标EDA窗口ID;省略时使用当前活动窗口

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.6/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 burden. It does disclose the return type (Promise<IPCB_LayerItem | undefined>) and edge cases (undefined when no active layer or no PCB canvas). However, it doesn't describe whether this is a read-only operation, whether it can fail with an error, or what 'detailed properties' means. For a getter, the 'gets' verb itself implies read-only, but the description doesn't add much beyond that.

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

Conciseness4/5

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

The description is compact: a one-line signature, a one-line purpose, and a returns note with the key edge case. Every sentence earns its place. The 'ADD since EDA v4.2' remark is slightly noise-prone but harmless. Front-loading the signature and purpose is effective.

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?

For a simple getter with no required parameters and a clear return type, the description covers the essentials. The undefined edge cases are disclosed. What's missing is a bit more context about the returned IPCB_LayerItem structure, but given no output schema exists, a brief hint about what properties might be included would strengthen it. Still, the description is adequate for the tool's simplicity.

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 description coverage is 100%, so the schema already documents the two parameters (args and windowId). The description mentions no parameters because this tool takes none semantically — it operates on the current layer. The windowId parameter is a generic targeting mechanism, well covered by the schema. Baseline for 100% coverage is 3, and the description's clear 'no parameters needed' distinction adds a bit more.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb-resource pairing: 'pcb_Layer.getCurrentLayer() -> Promise<IPCB_LayerItem | undefined>' and explains it retrieves the current layer's detailed properties. The name clearly signals it is a getter for the current PCB layer, and the description does add meaningful intent. It doesn't explicitly differentiate from sibling layer tools (e.g., get_all_layers), but the 'current' scoping is clear enough.

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 context: when you need the currently active layer in a PCB canvas. It mentions returning undefined when no active layer or no PCB canvas exists, which is a useful edge-case guard. However, it doesn't explicitly state when to use this over alternatives like get_all_layers, or mention prerequisites like ensuring a PCB document is open.

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

Deploy Server

Other Tools