selector
Find every usage of a CSS #id or .class across HTML, CSS, and JavaScript files. Cross-reference definitions, attributes, and DOM API calls to trace where they are used.
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.
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": "selector"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| query | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |