Skip to main content
Glama

open_svg

Opens an SVG in the browser for users to select and annotate regions, returning annotations for further editing. Supports optional source script path to update generation code.

Instructions

在浏览器中打开一个 SVG 图,供用户圈选区域写批注。

打开后应调用 wait_for_annotations 等待用户提交批注。
svg_path 必须是绝对路径。source_script 可选:该 SVG 的生成脚本路径
(如 matplotlib 的 fig_*.py);之后每批批注都会原样带回该路径,
便于判断是改 SVG 文件还是改脚本重跑。title 可选,显示在页面顶栏。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo
svg_pathYes
source_scriptNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 browser-opening side effect, the requirement to await user annotations, and the behavior that source_script is echoed back with each annotation batch. However, it does not clarify whether the tool mutates the SVG file, what the immediate return value is, or what happens if the user cancels without annotating. The disclosed behaviors are useful but incomplete for a tool with zero annotation coverage.

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 front-loaded, leading with the core purpose before elaborating on parameters. Each sentence adds distinct information: the workflow step, the path requirement, the source_script semantics, and the title behavior. Minor redundancy exists between the opening line and the operational details, but overall it is efficient with no filler.

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 tool with no annotations and no output schema, the description is reasonably complete: it covers purpose, the required follow-up action, parameter semantics, and the round-trip behavior of source_script. Gaps remain around the return value format and error/cancel handling, but these are not critical for an agent determining whether and how to invoke the tool correctly.

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 0%, so the description must fully compensate. It does: svg_path must be absolute (syntax constraint), source_script is contextualized as the generation script (e.g., matplotlib fig_*.py) with its return behavior explained, and title is described as appearing in the top bar. This adds real meaning beyond the bare property names and types for all three parameters, nearly closing the coverage gap.

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 states a specific verb+resource ('打开一个 SVG 图') with clear intent (供用户圈选区域写批注). It clearly differentiates from sibling tools: wait_for_annotations and get_annotations are about retrieving annotation data, whereas this tool handles the opening/display action. The purpose is unambiguous and contains no tautology.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs the agent to call wait_for_annotations after opening, establishing the correct sequential workflow. It also clarifies the conditional choice between editing the SVG vs. re-running the source script via the source_script parameter. It lacks explicit when-not-to-use guidance but provides solid operational direction; the alternating tool routing is implied through sequential instructions rather than named exclusions.

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