MCP server exposing the CSS dead-code semantic-classification layer as callable tools, with state persisted across runs for CI-guard use.
Server has 5 tools with explicit Zod schemas and descriptions. Naming follows verb_noun pattern (scan_repo, get_dead_css_candidates, classify_css_selector, record_selector_decision, apply_css_removal). Descriptions are detailed (100-250 chars) and explain WHEN to use each tool. Tool annotations (readOnlyHint, destructiveHint) are present. However, parameter descriptions lack specificity on constraints (e.g., repoPath format, enum values for status). Output schemas are not documented, responses are JSON strings without field-level typing. Error handling is minimal; no recovery guidance or actionable error messages visible. The in-memory state store is a critical limitation flagged in comments but not addressed in tool definitions.
Delete one already-approved selector from one file. Refuses unless the selector's classification is in DeletableCategories AND its tracked status is APPROVED_FOR_REMOVAL — every other case returns an error instead of acting. Caller is responsible for build verification and PR creation afterward; this tool never batches, commits, or pushes on its own.
Re-classify one already-known selector — for double-checking a specific finding scan_repo already surfaced, not for discovering selectors in the first place. If you don't already know the selector and file, call scan_repo instead. Read-only — never modifies files.
Return already-scanned selector-classification state for a repo, split into new-since-last-run vs. previously-seen, so a CI run only surfaces what actually changed. Call scan_repo first — this only reads what a prior scan_repo call wrote; it does not scan anything itself. Read-only.
Persist a human or agent decision on a flagged selector (approve for removal, dismiss as false positive, needs review) so it is not re-flagged identically on the next run. Writes state, not code.
The actual automated entry point — give it one local repo path and it walks every CSS file, resolves every selector it finds via the literal-match first pass, classifies what it can, and persists the results. This is what a CI job or agent should call. classify_css_selector, record_selector_decision, and apply_css_removal exist for drilling into one specific finding afterward — they are not the primary workflow, this is.
Output schemas not documented. Tools return JSON strings without field-level type definitions. LLMs cannot reliably extract structured data or plan downstream calls.
Parameter descriptions lack format/constraint details. 'repoPath' does not specify absolute vs relative, or validation rules. 'status' enum is documented but other params lack similar clarity.
No error handling or recovery guidance. Tools do not document what errors are possible, whether they are retryable, or what the LLM should do next.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2026-07-28+ | v2 |
In-memory state store (stateStore Map) resets on process restart. Code comments acknowledge this defeats CI-guard use case but tool definitions do not warn users. Persistence is critical for the domain but unimplemented.
apply_css_removal lacks confirmation/dry-run pattern. Destructive operations should support preview or confirmation before execution to prevent accidental deletions.