Skip to main content
Glama

get_component_definition

Retrieve the full definition of a Haystack pipeline component by its fully qualified type, with optional version specification for matching pipeline dependencies.

Instructions

Returns the definition of a specific Haystack component. :param component_type: Fully qualified component type (e.g. haystack.components.routers.conditional_router.ConditionalRouter) :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: ComponentDefinition 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
component_typeYes
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

B3.3/5.0
Behavior2/5

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

The description does not disclose any behavioral aspects such as side effects, permissions, or whether the operation is read-only. While the name suggests a get operation, the description does not explicitly state that it is safe or free of side effects, and there are no annotations to fill this gap.

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

Conciseness3/5

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

The description is reasonably structured but contains redundant boilerplate about the object store and output formatting (e.g., repeating 'Use the object store tools...' twice). While not excessively long, this repetition could be trimmed for conciseness without losing essential information.

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

Completeness3/5

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

The description covers the tool's purpose, parameters, and return type, but it lacks context about why or when one would need a component definition (e.g., for inspecting inputs/outputs before pipeline creation). It does not explain the structure of the returned definition or its typical use in the broader workflow.

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?

The description provides meaningful explanations for both parameters. For component_type, it gives a concrete example. For haystack_version, it explains how to derive the value from the pipeline's dependencies. This adds clarity beyond the schema, which only lists types and required status.

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 clearly states the tool's function: 'Returns the definition of a specific Haystack component.' This is a specific verb-resource pair, and it distinguishes from sibling tools like get_pipeline or list_pipelines by focusing on component definitions.

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

Usage Guidelines2/5

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

The description does not provide guidance on when to use this tool versus alternatives. It lacks any mention of use cases, prerequisites, or scenarios where this tool is appropriate, leaving the agent to infer its purpose from the name and generic description.

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