Skip to main content
Glama

Extract Design System From Existing Code

extract-design-system
Read-onlyIdempotent

Extract design tokens from CSS or source samples and return structured tokens for design-system analysis; inputs are treated as data, with no script execution or server file access.

Instructions

Extract tokens from supplied CSS/source samples. Treat sources as data; no modules/scripts are executed or server files read.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "extract-design-system"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssNo
nameNo
sourcesNo
maxTokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false. The description adds real value beyond that by stating sources are treated as data, no modules/scripts are executed, and no server files are read, which reassures an agent about side effects and SSRF-style risks. It says nothing, however, about the shape of the returned tokens, which matters since there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the action and followed by the safety constraint. No filler or repetition.

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?

For a tool with four parameters, a nested source array, and no output schema, the description covers purpose and safety but omits all parameter meaning and any hint of what is returned. An agent could call it but could not confidently construct the css vs. sources payload or interpret results.

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 0%, so no parameter is documented in the schema. The description mentions the inputs only obliquely as 'CSS/source samples' and does not explain css vs. sources, the meaning of name, or what maxTokens bounds, leaving a substantial gap against four parameters including a nested array.

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: 'Extract tokens from supplied CSS/source samples.' The word 'supplied' distinguishes it from the URL-fetching sibling extract-from-url, though that sibling is never named outright.

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 explicit when-to-use, when-not-to-use, or named alternative. An agent must infer from the word 'supplied' that this is the path for caller-provided code rather than fetched URLs, and nothing says whether extract vs create-design-system is the right next step.

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