Skip to main content
Glama

search_components

Read-onlyIdempotent

Find up to 8 compact component summaries by intent or keyword to select UI elements like buttons, dialogs, or tables for Basecoat UI projects.

Instructions

Find up to 8 compact component summaries by intent and/or query (either field may be omitted). Valid component IDs include: button, card, dialog, dropdown-menu, table, tabs, badge, avatar, input, select, etc. Next step: Call get_component_details or basecoat_component_syntax with the selected component id.

Input Schema

NameRequiredDescriptionDefault
idNoAlternative component identifier alias.
nameNoAlternative component identifier alias.
queryNoDirect component ID or name keyword to filter (e.g., "dialog", "button", "table").
intentNoSemantic intent or use case (e.g., "modal dialog", "user menu", "data table", "form field").
componentIdNoAlternative component identifier alias.
environmentNoTarget environment (defaults to html).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.8.0
    • addedInput schema / properties / componentId
      Added value: +{
      +  "description": "Alternative component identifier alias.",
      +  "maxLength": 80,
      +  "type": "string"
      +}
    • addedInput schema / properties / environment
      Added value: +{
      +  "description": "Target environment (defaults to html).",
      +  "enum": [
      +    "html",
      +    "astro",
      +    "react",
      +    "vue",
      +    "svelte"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / id
      Added value: +{
      +  "description": "Alternative component identifier alias.",
      +  "maxLength": 80,
      +  "type": "string"
      +}
    • addedInput schema / properties / intent / description
      Added value: +"Semantic intent or use case (e.g., \"modal dialog\", \"user menu\", \"data table\", \"form field\")."
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Alternative component identifier alias.",
      +  "maxLength": 80,
      +  "type": "string"
      +}
    • addedInput schema / properties / query / description
      Added value: +"Direct component ID or name keyword to filter (e.g., \"dialog\", \"button\", \"table\")."
  2. Changed1 schema field changedv1.0.3
    • removedInput schema / required
      Removed value: -[
      -  "intent",
      -  "query"
      -]
  3. First observedv1.0.1

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world). The description adds real behavioral detail beyond that: results are capped at 8 and are 'compact summaries' rather than full definitions. It doesn't discuss query-matching behavior or empty-result handling, but for an annotated read tool this is solid.

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?

Three front-loaded sentences: action+limit first, valid IDs second, next-step routing third. Every sentence carries information, though the ID enumeration is a bit list-heavy for the space it consumes.

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?

With no output schema, the description compensates by disclosing the return shape (8 compact summaries) and the follow-up tools, which is what an agent needs to chain calls. Remaining gaps are minor: no guidance on empty results or on choosing among the alias parameters.

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 100% with examples for query and intent, so the baseline is 3. The description adds a broader catalog of valid component IDs (dropdown-menu, tabs, badge, avatar, etc.) that extends beyond the schema's examples and directly helps construct valid queries, pushing it above baseline. The three overlapping identifier aliases (id/name/componentId) are left unexplained in both places.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb+resource: 'Find ... compact component summaries by intent and/or query', with the result cap (up to 8) stated. It implicitly distinguishes 'component summaries' from macro-block search. It doesn't explicitly contrast itself with search_macro_blocks, so it stops short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Next step: Call get_component_details or basecoat_component_syntax' line establishes this as the discovery entry point and routes the agent forward. However, it never states when to prefer this over search_macro_blocks or other sibling lookups, so usage is implied rather than explicit.

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