Skip to main content
Glama

search_component_definitions

Search component definitions by semantic similarity to find reusable components. Specify a query, limit results and Haystack version, then use the returned object ID elsewhere.

Instructions

Searches for components based on name or description using semantic similarity. :param query: The search query :param top_k: Maximum number of results to return (default: 5) :param haystack_version: Optional version of Haystack to use. Pass the same version as specified in the pipeline yaml's dependencies section for the haystack-ai package.

:returns: ComponentSearchResults model or error message string

The output is automatically stored and can be referenced in other functions. Returns a formatted preview with an object ID (e.g., @obj_123). Use the object store tools in combination with the object ID to view nested properties of the object. Use the returned object ID to pass this result to other functions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
haystack_versionNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.1.25
    • addedInput schema / properties / haystack_version
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Haystack Version"
      +}
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that output is automatically stored, returns a formatted preview with an object ID, and explains how to use the object ID with object store tools. It also notes the possibility of an error message string. This goes beyond a simple 'search' description, though it stops short of discussing permissions or rate limits.

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?

The description is well-structured with a clear opening statement, parameter docs, and return behavior. It is slightly long but every sentence conveys useful information, especially the object ID usage instructions.

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?

The description covers the search behavior, parameter usage, return type, storage mechanism, and how to reference the result via object ID. It is sufficient for an agent to correctly invoke and use the tool, though it could be even more complete by explaining the semantics of 'semantic similarity' in terms of matching behavior.

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

Parameters5/5

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

Schema description coverage is 0%, and the description fully compensates by explaining all three parameters: query, top_k (with default and meaning), and haystack_version (with detailed guidance on matching the pipeline yaml). This adds significant meaning beyond the raw schema.

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?

The description states the tool 'Searches for components based on name or description using semantic similarity,' which is a specific verb+resource+method. This clearly distinguishes it from sibling search tools like search_docs and search_pipeline.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool (semantic search for components) and even adds a note about matching the haystack_version to the pipeline yaml. However, it does not explicitly exclude alternative tools or mention when not to use it.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deepset-ai/deepset-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server