Skip to main content
Glama

Search components

search_components
Read-only

Searches the components of every package assigned to the project by use case, behavior, or description, and returns up to 10 ranked matches with a relevance score. Read-only. Use it when you can describe what the UI must do but do not know the component name. The query is free-text describing the need, such as "date range picker" or "dismissible inline warning" - not a component name, not a glob, and not a props expression. Do not use it when the exact name is known (get_component is direct and returns the full spec) or when you want the complete catalog (list_components). Semantic ranking needs AI features on the Team plan or above; on other plans it falls back to name and import-path matching and the score is null. No close match returns an empty result list, not an error. Null scores or no results do not mean the component is missing: in that mode a use-case phrase often matches nothing, so choose from list_components by name and use note, or retry with a plain component word such as "button".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>",
      "project_id": "<project_id>"
    },
    "name": "search_components"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesFree-text description of the need - a use case, behavior, or purpose, e.g. "date range picker". Not a component name and not a glob.
project_idYesUUID as returned by list_projects - not the project name, title, or slug, and not guessable. Fetch it once and reuse the same id across tools. An id outside the caller's organization returns "Project not found or access denied" rather than empty data, and a project withheld by a plan limit returns a plan error that retrying cannot clear. It bounds the search to the packages assigned to this project, so the same query returns different matches for different projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / project_id / description
      Previous value: -"Project ID from list_projects"New value: +"UUID as returned by list_projects - not the project name, title, or slug, and not guessable. Fetch it once and reuse the same id across tools. An id outside the caller's organization returns \"Project not found or access denied\" rather than empty data, and a project withheld by a plan limit returns a plan error that retrying cannot clear. It bounds the search to the packages assigned to this project, so the same query returns different matches for different projects."
  2. Changed1 schema field changed
    • addedInput schema / properties / query / description
      Added value: +"Free-text description of the need - a use case, behavior, or purpose, e.g. \"date range picker\". Not a component name and not a glob."
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and destructiveHint=false, so the description is not needed for safety. It nonetheless discloses non-obvious behavior: semantic ranking requires AI features on Team plan or above, other plans fall back to name/import-path matching with null scores, and no match yields an empty list rather than an error. The closing warning that null scores or empty results do not mean the component is missing (with a concrete remediation) is exactly the kind of context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the primary purpose and return shape, then usage conditions, then constraints and fallbacks. It is longer than average but every sentence carries distinct information; nothing is restated for filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read tool with no output schema, it covers return cardinality and format (ranked matches, relevance score), plan-dependent behavior, failure semantics, and a next step on empty results. An agent has everything needed to invoke it and interpret the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameter descriptions already spell out the UUID-not-name constraint, org/plan error behavior, and project scoping. The description mainly restates that the query is free-text and adds a small amount ("not a props expression"), but contributes little meaning the schema does not already provide, so the baseline 3 applies.

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?

States a specific verb (searches), resource (components of packages assigned to the project), and the matching mode (use case, behavior, description) plus the return shape (up to 10 ranked matches with relevance score). It explicitly separates itself from get_component and list_components, so an agent can pick it without opening any schema.

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

Usage Guidelines5/5

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

Gives a concrete when-to-use condition ("you can describe what the UI must do but do not know the component name") and explicit when-not conditions with named alternatives: get_component when the exact name is known, list_components for the complete catalog. It also supplies a recovery path when the search returns nothing, which is guidance beyond simple routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.