Skip to main content
Glama
mayjack0312
by mayjack0312

eda_pcb_layer_modify_layer

Modify PCB layer attributes in EasyEDA Pro, updating name, type, color, or transparency for selected layers. Returns success status.

Instructions

pcb_Layer.modifyLayer(layer: TPCB_LayersInTheSelectable, property: { name?: string; type?: TPCB_LayerTypesOfInnerLayer; color?: string; transparency?: number }) -> Promise 修改图层属性 remarks: 仅内层和自定义层允许修改名称;仅内层允许修改类型, 透明度仅支持0-100之间的数 returns: 修改后的图层属性,如若为 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.5/5.0
Behavior3/5

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

With no annotations provided, the description carries full burden and does disclose return semantics (undefined means failure or nonexistent layer) and per-property constraints. However, there is an internal inconsistency: the signature declares Promise<boolean> while the 'returns' note describes returning modified layer properties, which undermines confidence in the actual behavior.

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 and information-dense: signature line, one-line purpose, terse remarks, and return note. No filler words. The only minor structural flaw is the redundant restatement of the signature at the top when the tool name already encodes the call.

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?

For a tool with no annotations and no output schema, it covers parameter constraints and failure semantics well. Gaps remain: the enum types TPCB_LayersInTheSelectable and TPCB_LayerTypesOfInnerLayer are not expanded, and the contradictory return-type information (boolean vs. properties object) leaves an agent uncertain about how to interpret the result.

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?

The input schema is a generic args-array wrapper with 100% coverage but zero semantic value, so the description must compensate—and it does. The signature documents the layer parameter type and the property object's four fields with types, and the remarks add critical value constraints (transparency range, which layers allow name/type changes) beyond the schema.

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 clear verb+resource: '修改图层属性' (modify layer properties) and enumerates the specific modifiable fields (name, type, color, transparency) via the signature. This distinguishes it from sibling layer tools like lock/visible/select, though it never names those alternatives explicitly.

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 remarks section provides meaningful usage constraints: only inner and custom layers allow name changes, only inner layers allow type changes, and transparency is limited to 0-100. This tells the agent when modifications are permitted, but gives no guidance on when to choose this tool over related siblings such as eda_pcb_layer_set_layer_visible or eda_pcb_layer_set_inactive_layer_transparency.

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