Skip to main content
Glama

css_var

Track down where CSS custom properties like --bg are defined and used across .css files and HTML style blocks, since single-file language servers cannot cross-reference them.

Instructions

Where is this --custom-property defined and used? Example: css_var(name="--bg").

The CSS/HTML language servers only see one file at a time, so var(--x) usages can't be cross-referenced across files that way — this scans .css files and HTML <style>/style="…" blocks/attributes instead. name may be given with or without the leading --. Definitions (value

  • enclosing context, e.g. @media (prefers-color-scheme: dark) › :root) and usages (grouped by file with line numbers) are reported separately per configured root (see WEBNAV_MCP_ROOTS; a single unnamed root by default), since each may define its own values. query is accepted as an alias for name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
queryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.3/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 discloses the scan scope (`.css` files plus HTML style blocks/attributes), that definitions and usages are reported separately, and that results are grouped per configured root with `WEBNAV_MCP_ROOTS` controlling roots. It does not mention whether files must be saved/indexed or any performance/limit behavior, but the disclosure is otherwise rich.

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 leading question plus example fronts the core intent effectively, and the parentheticals pack useful detail. The middle paragraph is dense and slightly run-on, but no sentence is filler.

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 structure needn't be explained, and the description instead explains what is reported (definitions with value/context, usages by file with line numbers) and the per-root grouping model. Combined with the alias/`--` handling, it is nearly complete for a two-optional-string tool, missing only edge-case behavior when no name is supplied.

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 0%, so the description must compensate, and it does: it explains that `name` may be passed with or without the leading `--`, and that `query` is an accepted alias for `name`. It does not state the consequence of supplying neither or both, but both parameters are meaningfully documented.

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?

States a specific verb+resource in question form (where is `--custom-property` defined and used) and immediately gives a call example. It distinguishes itself from siblings like `references`/`definition` by explaining that language servers are single-file and this tool scans across `.css` and HTML `<style>`/`style=` blocks instead.

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 establishes the context in which this tool is needed — cross-file var() resolution that single-file language servers cannot do — which implies choosing it over `definition`/`references` for custom properties. However, it never explicitly states exclusions (e.g. 'use `references` for non-custom-property symbols'), so routing is inferred rather than spelled out.

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