Skip to main content
Glama

selector

Find where a CSS id or class is used across your workspace by cross-referencing stylesheets, HTML attributes, and JavaScript code.

Instructions

Who uses this #id or .class? Example: selector(name=".card-title").

Looks up the selector across the whole workspace.

Cross-references CSS rule definitions, HTML id=/class= attributes, and JS usages (getElementById, classList.add/remove/toggle/contains, querySelector/querySelectorAll, className assignment, and any JS string literal exactly equal to the bare name, e.g. an id passed to a project's own helper like onClick("btn-save", …), labeled "string literal"). Hits in generated output (WEBNAV_MCP_EXCLUDE) are labeled [generated]; edit their source instead. This is something the single-file CSS/HTML language servers can't do. name must include the leading # or .. Grouped by file with line numbers, separately per configured root (see WEBNAV_MCP_ROOTS). A JS hit built from string concatenation (e.g. getElementById("view-" + x)) is reported against only its static prefix and labeled "dynamic partial match"; a query whose name starts with such a prefix (e.g. #view-components against a stored #view-) also surfaces that hit, labeled "dynamic partial match via ''", instead of being silently dropped or guessed. query is accepted as an alias for name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
queryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

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 disclosure burden and does so well: it enumerates exactly what is scanned, how special cases are labeled ('[generated]', 'string literal', 'dynamic partial match'), and how env vars (WEBNAV_MCP_EXCLUDE, WEBNAV_MCP_ROOTS) affect coverage. It never explicitly states the operation is read-only or describes result ordering beyond 'grouped by file', leaving a small gap for a no-annotation tool.

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-loaded with the one-line answer and example before the detail, and every sentence is information-dense rather than filler. The two trailing sentences on dynamic partial matching are heavy relative to their importance, but they describe genuine edge-case behavior an agent would otherwise misread.

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?

For a tool with no annotations and no output schema, the description is nearly self-sufficient: it explains what is searched, how hits are labeled, and how they are grouped. The one thing left open is the concrete response shape (field names/structure of the returned hits), which it only describes prose-wise.

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 mandates the leading '#' or '.', gives a worked example, and explains that 'query' is an alias for 'name'. It does not clarify that one of the two must actually be supplied (required count is 0), so the requiredness question remains ambiguous.

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 opening sentence states a specific verb and resource ('Who uses this #id or .class?') and immediately clarifies scope by listing what it cross-references (CSS rules, HTML id/class attrs, JS usages). It also explicitly carves itself out from the sibling single-file CSS/HTML language servers, so an agent can tell it apart without opening a schema.

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 gives clear context: workspace-wide lookup that the single-file CSS/HTML language servers cannot perform, which implies when to reach for it. However, it never names its actual siblings (references, css_var, search_symbol) or states an explicit when-not condition, so the guidance stops short of full routing.

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