Skip to main content
Glama

批量读取蓝湖元素标注样式

lanhu_inspect_elements

Read annotation panels for multiple layers in one Lanhu canvas session, returning font CSS, sizes, text, slices, and stacking; fails the whole batch if any layer is missing.

Instructions

在同一个稳定蓝湖画布会话中按传入顺序读取多个图层的真实标注面板,返回字体 CSS、尺寸、原文、切片信息和相交图层堆叠关系;缺少任一图层时整批报错,不返回部分结果。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>",
      "layerIds": "<layerIds>"
    },
    "name": "lanhu_inspect_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes蓝湖分享或页面 URL
layerIdsYes当前设计版本的图层 ID,顺序会保留
copyFieldsNo对每个元素额外点击并核对相同字段;结束后恢复浏览器剪贴板

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses batch atomicity ('missing any layer errors the whole batch, no partial results'), the session-stability requirement, and enumerates the returned data. It omits whether the call is strictly read-only, whether it drives a browser, and any limits on its 100-layer cap beyond the schema.

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?

A single dense sentence that front-loads the session/batch scope, then the return payload, then the failure contract. Every clause earns its place; it is not padded, though the semicolon-chain makes it slightly harder to scan than short separated sentences would.

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

Completeness5/5

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

There is no output schema, and the description compensates by enumerating the returned fields and the partial-result/error contract, which is exactly what an agent needs to interpret results and handle failures. Combined with 100% schema coverage on the three parameters, nothing material is left for the caller to guess.

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?

Schema coverage is 100%, so all three parameters are already documented in the schema. The description reinforces order preservation ('in the order passed') and ties layerIds to the all-or-nothing failure mode, but adds nothing about copyFields' clipboard-verification semantics beyond what the schema states. Baseline 3 applies.

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?

States a specific verb and resource: reading the real annotation panels of multiple layers in one stable Lanhu canvas session, plus the concrete returned fields (font CSS, dimensions, source text, slice info, intersecting-layer stacking). Batch plurality clearly separates it from the singular lanhu_inspect_element, though that sibling is never named.

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 batch framing and the 'stable canvas session' precondition imply when to reach for it instead of a single-element read, and the all-or-nothing error rule warns about the main risk. But there is no explicit when-to-use/when-not statement or named alternative (e.g., lanhu_inspect_element for one layer, lanhu_list_elements for discovery).

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