Skip to main content
Glama
MCP Design System Extractor

MCP Design System Extractor

get_external_css

Extract design tokens and file statistics from external CSS files without returning CSS content by default, avoiding response size limits. Request full CSS only when needed.

Instructions

Extract design tokens from CSS files. DEFAULT BEHAVIOR: Returns ONLY tokens and file statistics (small response ~1-3K tokens). Does NOT return CSS content by default to avoid token limits. For full CSS content, explicitly set includeFullCSS=true and maxContentSize. Perfect for analyzing design system tokens without hitting response size limits.

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": {
      "cssUrl": "<cssUrl>"
    },
    "name": "get_external_css"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssUrlYesURL of CSS file to analyze. IMPORTANT: Tool returns only design tokens by default (not CSS content) to avoid response size limits.
extractTokensNoExtract design tokens (colors, spacing, typography, etc.). Default: true. This is the main purpose of this tool.
includeFullCSSNoOPTIONAL: Set to true ONLY if you need the actual CSS content. WARNING: Large CSS files may hit token limits. Default: false (recommended).
maxContentSizeNoOPTIONAL: Max CSS content characters when includeFullCSS=true. Default: 10000. Larger files will be truncated.

Output Schema

NameRequiredDescriptionDefault
urlYesThe absolute URL that was fetched
tokensNonull when extractTokens=false
contentNoOnly when includeFullCSS=true
analysisYes
fileSizeYes
truncatedNo
tokenCountYes
originalUrlYesThe URL as supplied by the caller
displayedSizeNo
tokensExtractedYes
fileSizeFormattedNo
truncationWarningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.0
  2. Removedv1.2.0
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full behavioral burden and does well: it discloses the default response shape, approximate size (~1-3K tokens), that CSS content is omitted by default, and that content is truncated beyond maxContentSize. It does not cover failure modes such as unreachable URLs, non-CSS responses, or auth/CORS constraints.

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 default behavior is front-loaded and the critical warning appears early, which is the right ordering for an agent scanning the text. The 'avoid token limits' rationale is repeated three times across the description, which costs a little tightness.

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?

An output schema exists, so return values need not be explained, and the description covers the mode switch, size expectations, and truncation. What remains missing is error/edge-case behavior for a network-backed extractor, which is a modest gap rather than a blocking one.

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 coverage is already 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains the dependency between includeFullCSS and maxContentSize and warns that large files may be truncated. It does not describe the cssUrl format (absolute vs relative) beyond what the schema already states.

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?

The description states a specific verb and resource: 'Extract design tokens from CSS files', and clarifies that full CSS content is secondary. It implicitly separates itself from siblings like get_component_html or get_theme_info by targeting raw CSS URLs for token extraction, but it never names those alternatives explicitly.

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?

It clearly frames the default use case (token analysis only) and the exception (set includeFullCSS=true with maxContentSize when the actual CSS is needed), so an agent knows which mode to pick. It stops short of saying when a different sibling tool would be a better choice.

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