Skip to main content
Glama

Component inventory

inventory_components
Read-only

Inventory the components in a stylesheet and, if given, its markup. Pass css and optionally html (free), or a public url (Pro, which also reads the page markup). Classes are grouped into roles (button, card, input, badge, nav, alert, modal, avatar, tooltip) from their names, then variants are found from modifier classes (btn--primary, btn-lg, btn.primary). Reports each component family with its base properties and variants, inconsistencies across the same role (different corner radius, padding, font size, weight or height between families, or between variants that should match; size and shape variants are allowed to differ), naming collisions (btn and button both defined, for example) and properties set twice at the same level. With markup it also counts instances, common class combinations, inner structures, classes used but never styled and unclassed native buttons.

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": "inventory_components"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssNoCSS text to read (a stylesheet, or several concatenated). Free up to 100,000 characters; Pro up to 2,000,000.
urlNoPro only. Public page whose linked and inline stylesheets are fetched (up to 12 sheets, 5 MB).
htmlNoOptional page markup. Any <style> blocks in it are read as CSS too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Goes well beyond the readOnly/openWorld annotations: it discloses the free vs Pro size limits, the 12-sheet/5 MB url cap, that markup enables instance counting, and exactly which inconsistency classes are flagged vs tolerated (size and shape variants may differ). Missing only output shape/nesting detail, 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.

Conciseness4/5

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

Front-loads the inputs before the long enumeration of report contents, and every clause carries information. It is one dense paragraph, though, and the property list ('different corner radius, padding, font size, weight or height') is verbose.

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

Completeness5/5

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

With no output schema, the description must convey what comes back, and it does: component families with base properties and variants, cross-family inconsistencies, naming collisions, duplicate declarations, plus markup-derived counts and unused/unclassed classes. That is enough for an agent to decide whether the output answers its question.

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 all three parameters are already described in the schema. The description adds only marginal value, mainly restating that html is optional and url is Pro-only; the genuinely new information (instance counting with markup) is a behavioral consequence rather than parameter semantics.

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?

Opens with a specific verb and scope: inventory components in a stylesheet and optional markup, and states the grouping method (roles from class names, variants from modifier classes). This clearly separates it from token-extraction siblings like extract_design_tokens or score_design_system.

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?

It explains the two input routes (css/html vs Pro url), which implies when each applies, but never names an alternative tool or says when not to use this one (e.g. versus extract_design_tokens or site_inventory). Usage is inferable rather than directed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources