Skip to main content
Glama
mayjack0312
by mayjack0312

eda_sch_document_get_primitives_in_region

Retrieve all schematic primitives fully contained within a specified rectangular region. Use to filter drawing elements by bounds, ignoring partial overlaps.

Instructions

sch_Document.getPrimitivesInRegion(left: number, right: number, top: number, bottom: number) -> Promise<Array> 获取区域内所有图元 remarks: 本接口仅会返回完全包含在区域内的图元,如果图元有部分位于区域外,将被忽略

ADD since EDA v4.2 returns: 区域内所有图元

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.8/5.0
Behavior4/5

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

There are no annotations, so the description carries the full behavioral burden. It discloses a non-obvious and important rule: only primitives fully contained in the region are returned, and partially overlapping primitives are ignored. It does not explicitly state read-only behavior, coordinate units, or edge-case semantics, but the 'get' verb and function name strongly imply a query.

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, front-loads the signature and key behavior, and includes a useful version note. It is slightly redundant because '获取区域内所有图元' and 'returns: 区域内所有图元' say the same thing, but overall it remains efficiently structured.

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 simple region-query tool with no output schema and no annotations, it provides the essential operation, return type, and a meaningful filtering rule. It is missing coordinate unit/system details and an explicit read-only confirmation, which leaves some ambiguity for correct invocation in different editor configurations.

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 only provides generic args and windowId descriptions; the description's signature adds the parameter names and order (left, right, top, bottom), which helps invocation. However, it does not explain units, coordinate system, or boundary inclusion semantics beyond the containment remark, so the added semantic value is limited.

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 names the exact API (sch_Document.getPrimitivesInRegion), states it returns all primitives within a region, and the remarks clarify the containment rule. This clearly distinguishes it from point-based queries like eda_sch_document_get_primitive_at_point and the PCB equivalent.

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 intended use case is implied by 'get primitives in region', but the description gives no explicit when-to-use or when-not-to-use guidance, and does not mention alternatives such as eda_sch_document_get_primitive_at_point for point queries. The usage context is inferable but not stated.

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