Skip to main content
Glama

extract_tokens

Pull colors, spacing, corner radius, and typography from reference design images to create reusable Design Tokens. Supports batch processing of multiple images.

Instructions

从参考设计图提取 Design Tokens(颜色、间距、圆角等)- 支持多图批量处理

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionsNo
imagePathsYes参考设计图的文件路径数组(支持多张)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses batch/multi-image support, which is useful context, but says nothing about caching behavior (which the schema exposes), concurrency limits, permissions, failure modes on unreadable images, or what the extraction returns. For an unannotated tool with a nested options object, this is a significant gap.

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 compact sentence with the core verb-resource pairing front-loaded and the batch capability trailing as a qualifier. No wasted clauses, though it is thin rather than lean — brevity here partly reflects under-specification.

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

Completeness2/5

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

With no annotations, no output schema, a nested options object, and only 50% schema coverage, the description should do more work. It never explains the shape of the extracted tokens, how caching or concurrency affect results, or how multi-image output is aggregated — all things an agent needs before invoking.

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 50%, so the schema already documents imagePaths and the five nested options fields (useCache, extractColors, extractSpacing, extractTypography, maxConcurrency) with defaults. The description's mention of 颜色/间距/圆角 loosely maps to the extraction flags but adds no syntax, format, or default information beyond the schema. Baseline 3 is appropriate.

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 (提取/extract) and resource (Design Tokens) with concrete examples of what tokens are covered (颜色、间距、圆角) and the source (参考设计图). It goes beyond a tautology of the name. It does not, however, distinguish itself from siblings like analyze_requirement or audit_visual, which also operate on design inputs.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus analyze_requirement, generate_design, or audit_visual, and no prerequisites or exclusions are given. The 'batch processing' note describes a capability, not a usage condition. The agent must infer the routing from the name alone.

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