Skip to main content
Glama

template.add

Crops an icon from a screenshot and saves it as a named template for a game, updating the manifest so UI elements can be matched permanently without hovering.

Instructions

声明图标模板:从截图(缺省最近一次 vision.screenshot)按 box 裁剪图标,写入 templates// 并更新 manifest。这是'图标→语义'声明层的一次性成本,之后 ui2.find_templates 永久可匹配(无需 hover)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boxYes[l,t,r,b] 截图上的裁剪框
descNo用途说明(声明层核心字段)
fromNo截图路径,缺省最近一次 vision.screenshot
gameYes
kindNo
nameYes模板名(ascii slug,如 flash)
labelNo显示名(如 闪现)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description must carry the behavioral load, and it does disclose meaningful traits: it crops from the last vision.screenshot by default, writes files into templates/<game>/, mutates a manifest, and the result persists for future matching. It omits permission/auth needs, overwrite behavior for an existing template name, and failure modes when the box is invalid.

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 action is front-loaded in the first clause and the entire definition is two tight sentences with no filler. The parenthetical and the second sentence about permanence both earn their place, though the content is dense enough that it borders on packing two ideas into one sentence.

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?

With no output schema and no annotations, the description still tells the agent what is produced (a crop written under templates/<game>/, manifest updated) and why it matters, which is enough to invoke it correctly. It could say more about the returned identity of the created template and what happens on a name collision, but nothing essential is missing for a 7-parameter file-writing tool.

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 description coverage is 71%, so the structured fields already do most of the work; the description's contributions (box as a crop region, from defaulting to the last screenshot, game as the target directory) largely restate schema descriptions. It adds no meaning for the undocumented parameters such as kind, and offers nothing on coordinate space or box validation.

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?

States a specific verb+resource: declaring an icon template by cropping from a screenshot by box, writing to templates/<game>/ and updating the manifest. It also names the downstream sibling (ui2.find_templates), so an agent can tell this declaration tool apart from the matching tools without opening any schema.

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?

Frames the tool as a one-time 'icon→semantic' declaration cost whose payoff is that ui2.find_templates can then match permanently without hover, which is a clear when-to-use story tied to an alternative. It stops short of an explicit when-not-to-use (e.g. one-off matching without declaring, which other siblings such as ui2.scene_match cover), so it is good but not exhaustive.

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