Skip to content

MCP Tools

The MCP server and the CLI both route to the same six tool handlers in @cl-mcp/core. Every tool accepts an optional library argument, and component names accept lib:Name qualifiers (for example ui:Button).

A compact reference for a library. In multi-library mode it renders per-library sections. Good first call to orient an agent.

Search or browse components — semantic search when given a query, or a listing when not. The resolver cascades exact → selector → fuzzy → semantic.

Detailed information for one component, at a chosen detail level: api, full, examples, or types.

The batch version of get_component — resolve and format several components in one call.

Validates Angular templates against the extracted component APIs. Refuses React libraries and points to validate_usage.

Framework-dispatched validation: JSX for React libraries, templates for Angular libraries.

Template validation parses each selector into per-comma clause matchers, so compound-selector hosts (button[mat-button], [a],[b] lists) are fully validated: a binding is valid if any matched API declares it, and :not(...) matches conservatively.

JSX validation flags unknown props and missing required props (with Levenshtein suggestions), is spread-aware, and ignores unregistered/DOM elements. Prop values are not checked — use get_component for the allowed literal values.

Angular validation requires @angular/compiler

Section titled “Angular validation requires @angular/compiler”

Angular template validation needs the optional @angular/compiler peer dependency. Without it, the result is a single angular-compiler-unavailable error; React/JSX validation is unaffected.

The handlers are exported from @cl-mcp/core as TOOL_HANDLERS (pure args → ToolResponse functions with no SDK dependency). See the API Reference for the exact signatures.