Skip to main content
Glama

unslop_extract_dna

Extracts color palettes, font stacks, spacing scales, border radii, and shadow tokens from a local CSS file or live URL, returning a reusable DesignPreset and Agent Skill markdown.

Instructions

Read-only Design DNA extractor that parses a local CSS/stylesheet file or fetches a live HTTP(S) webpage URL to extract color palettes, font stacks, spacing scales, border radii, and shadow tokens. Compiles and returns a reusable DesignPreset object and Agent Skill markdown in memory without writing files to disk.

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": {
      "source": "<source>"
    },
    "name": "unslop_extract_dna"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional human-readable identifier for the compiled design preset (defaults to 'extracted-dna').
sourceYesLocal CSS file path (relative to project root) or full HTTP(S) URL to extract design tokens from.
timeoutMsNoOptional network timeout in milliseconds per HTTP(S) stylesheet request (defaults to 8000).
maxStylesheetsNoOptional maximum number of linked external stylesheets to fetch when source is an HTML URL (defaults to 5).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.1.2
    • changedInput schema / properties / maxStylesheets / description
      Previous value: -"Maximum external stylesheets to fetch."New value: +"Optional maximum number of linked external stylesheets to fetch when source is an HTML URL (defaults to 5)."
    • changedInput schema / properties / name / description
      Previous value: -"Human-readable name for the compiled preset."New value: +"Optional human-readable identifier for the compiled design preset (defaults to 'extracted-dna')."
    • changedInput schema / properties / source / description
      Previous value: -"CSS path or HTTP(S) URL."New value: +"Local CSS file path (relative to project root) or full HTTP(S) URL to extract design tokens from."
    • changedInput schema / properties / timeoutMs / description
      Previous value: -"Per-request timeout in milliseconds."New value: +"Optional network timeout in milliseconds per HTTP(S) stylesheet request (defaults to 8000)."
  2. First observedv2.1.1

TDQS

A4/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 well: it declares read-only behavior, explicitly says nothing is written to disk, and reveals that live HTTP(S) fetching occurs (implying network dependency). Gaps remain around failure behavior for unreachable URLs or missing files, and whether remote fetches have side effects or rate constraints beyond the timeout.

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 tightly packed sentences with no filler; the read-only framing and in-memory/no-write guarantee are front-loaded, and the enumeration of token types is efficient rather than verbose.

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?

There is no output schema, and the description correctly fills that gap by describing the return value (a DesignPreset object plus Agent Skill markdown, held in memory). It falls short only on edge-case behavior — malformed sources, empty extraction results, or how timeouts surface to the caller.

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 the baseline is 3. The description corroborates that source may be a local path or full HTTP(S) URL and that linked stylesheets are fetched, but it adds no format rules, path-resolution details, or default semantics beyond what the schema properties already document.

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 names specific verbs (parses, fetches, compiles) and a precise resource (local CSS/stylesheet file or HTTP(S) page) plus the exact token categories extracted (colors, fonts, spacing, radii, shadows). It also implicitly separates itself from the sibling family (apply_preset, audit, list_presets) by stating it only extracts and returns a DesignPreset rather than applying anything.

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?

Usage is only implied: a read-only extractor that produces a preset in memory, which an agent can infer should precede apply_preset. There is no explicit "use when" statement, no exclusion (e.g. when to prefer audit or list_presets instead), and no note on prerequisites such as network access or valid file paths.

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