Skip to content

Tool Base Functions

deepset_mcp.tools.get_latest_custom_component_installation_logs async

get_latest_custom_component_installation_logs(
    *, client: AsyncClientProtocol, workspace: str
) -> str

Get the logs from the latest custom component installation.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The API client to use.

required
workspace str

The workspace to operate in.

required

Returns:

Type Description
str

The latest installation logs or error message.

deepset_mcp.tools.list_custom_component_installations async

list_custom_component_installations(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    limit: int = 20,
    after: str | None = None,
) -> PaginatedResponse[CustomComponentInstallation] | str

List custom component installations.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The API client to use.

required
workspace str

The workspace to operate in.

required
limit int

Maximum number of installations to return per page.

20
after str | None

The cursor to fetch the next page of results.

None

Returns:

Type Description
PaginatedResponse[CustomComponentInstallation] | str

Custom component installations or error message.

deepset_mcp.tools.search_docs async

search_docs(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    pipeline_name: str,
    query: str,
) -> str

Search deepset documentation using a dedicated docs pipeline.

Uses the specified pipeline to perform a search with the given query against the deepset documentation. Before executing the search, checks if the pipeline is deployed (status = DEPLOYED). Returns search results in a human-readable format.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name for the docs pipeline.

required
pipeline_name str

Name of the pipeline to use for doc search.

required
query str

The search query to execute.

required

Returns:

Type Description
str

A string containing the formatted search results or error message.

deepset_mcp.tools.get_component_definition async

get_component_definition(
    *, client: AsyncClientProtocol, component_type: str
) -> ComponentDefinition | str

Returns the definition of a specific Haystack component.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The API client to use

required
component_type str

Fully qualified component type (e.g. haystack.components.routers.conditional_router.ConditionalRouter)

required

Returns:

Type Description
ComponentDefinition | str

ComponentDefinition model or error message string

deepset_mcp.tools.get_custom_components async

get_custom_components(
    *, client: AsyncClientProtocol
) -> ComponentDefinitionList | str

Get a list of all installed custom components.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The API client to use.

required

Returns:

Type Description
ComponentDefinitionList | str

ComponentDefinitionList model or error message string.

deepset_mcp.tools.list_component_families async

list_component_families(
    *, client: AsyncClientProtocol
) -> ComponentFamilyList | str

Lists all Haystack component families that are available on deepset.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The API client to use

required

Returns:

Type Description
ComponentFamilyList | str

ComponentFamilyList model or error message string

deepset_mcp.tools.run_component async

run_component(
    *,
    client: AsyncClientProtocol,
    component_type: str,
    init_params: dict[str, Any] | None = None,
    input_data: dict[str, Any] | None = None,
    input_types: dict[str, str] | None = None,
) -> dict[str, Any] | str

Run a Haystack component with the given parameters.

This tool allows you to execute a Haystack component by providing its type and initialization parameters, then passing input data to get results. Use this to test components and see how they would work in your pipeline.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The API client to use

required
component_type str

The type of component to run (e.g., "haystack.components.builders.prompt_builder.PromptBuilder")

required
init_params dict[str, Any] | None

Initialization parameters for the component

None
input_data dict[str, Any] | None

Input data for the component

None
input_types dict[str, str] | None

Optional type information for inputs (inferred if not provided). For custom types use the full import path (e.g. haystack.dataclasses.document.Document for Document)

None

Returns:

Type Description
dict[str, Any] | str

Dictionary containing the component's outputs or error message string

deepset_mcp.tools.search_component_definition async

search_component_definition(
    *,
    client: AsyncClientProtocol,
    query: str,
    model: ModelProtocol,
    top_k: int = 5,
) -> ComponentSearchResults | str

Searches for components based on name or description using semantic similarity.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The API client to use

required
query str

The search query

required
model ModelProtocol

The model to use for computing embeddings

required
top_k int

Maximum number of results to return (default: 5)

5

Returns:

Type Description
ComponentSearchResults | str

ComponentSearchResults model or error message string

deepset_mcp.tools.create_index async

create_index(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    index_name: str,
    yaml_configuration: str,
    description: str | None = None,
) -> dict[str, str | Index] | str

Creates a new index within your deepset platform workspace.

Parameters:

Name Type Description Default
client AsyncClientProtocol

Deepset API client to use.

required
workspace str

Workspace in which to create the index.

required
index_name str

Unique name of the index to create.

required
yaml_configuration str

YAML configuration to use for the index.

required
description str | None

Description of the index to create.

None

deepset_mcp.tools.deploy_index async

deploy_index(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    index_name: str,
) -> str | PipelineValidationResult

Deploys an index to production.

This function attempts to deploy the specified index in the given workspace. If the deployment fails due to validation errors, it returns an object describing the validation errors.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
index_name str

Name of the index to deploy.

required

Returns:

Type Description
str | PipelineValidationResult

A string indicating the deployment result or the validation results including errors.

deepset_mcp.tools.get_index async

get_index(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    index_name: str,
) -> Index | str

Fetches detailed configuration information for a specific index, identified by its unique index_name.

Parameters:

Name Type Description Default
client AsyncClientProtocol

Deepset API client to use for requesting the index.

required
workspace str

Workspace of which to get the index from.

required
index_name str

Unique name of the index to fetch.

required

deepset_mcp.tools.list_indexes async

list_indexes(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    after: str | None = None,
) -> PaginatedResponse[Index] | str

Retrieves a list of all indexes available within the currently configured deepset workspace.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
after str | None

The cursor to fetch the next page of results. If there are more results to fetch, the cursor will appear as next_cursor on the response.

None

Returns:

Type Description
PaginatedResponse[Index] | str

List of indexes or error message.

deepset_mcp.tools.update_index async

update_index(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    index_name: str,
    original_config_snippet: str,
    replacement_config_snippet: str,
    skip_validation_errors: bool = True,
) -> Index | IndexOperationWithErrors | str

Updates an index configuration in the specified workspace with a replacement configuration snippet.

This function validates the replacement configuration snippet before applying it to the index. If the validation fails and skip_validation_errors is False, it returns error messages. Otherwise, the replacement snippet is used to update the index's configuration.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
index_name str

Name of the index to update.

required
original_config_snippet str

The configuration snippet to replace.

required
replacement_config_snippet str

The new configuration snippet.

required
skip_validation_errors bool

If True (default), updates the index even if validation fails. If False, stops update when validation fails.

True

Returns:

Type Description
Index | IndexOperationWithErrors | str

Updated index or error message.

deepset_mcp.tools.validate_index async

validate_index(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    yaml_configuration: str,
) -> IndexValidationResultWithYaml | str

Validates the provided index YAML configuration against the deepset API.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
yaml_configuration str

The YAML configuration to validate.

required

Returns:

Type Description
IndexValidationResultWithYaml | str

Validation result with original YAML or error message.

deepset_mcp.tools.create_get_from_object_store

create_get_from_object_store(
    explorer: RichExplorer,
) -> Callable[..., Any]

Creates the get_from_object_store tool.

deepset_mcp.tools.create_get_slice_from_object_store

create_get_slice_from_object_store(
    explorer: RichExplorer,
) -> Callable[..., Any]

Creates the get_slice_from_object_store tool.

deepset_mcp.tools.create_pipeline async

create_pipeline(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    pipeline_name: str,
    yaml_configuration: str,
    skip_validation_errors: bool = True,
) -> DeepsetPipeline | PipelineOperationWithErrors | str

Creates a new pipeline within the currently configured deepset workspace.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
pipeline_name str

Name of the pipeline to create.

required
yaml_configuration str

YAML configuration for the pipeline.

required
skip_validation_errors bool

If True (default), creates the pipeline even if validation fails. If False, stops creation when validation fails.

True

Returns:

Type Description
DeepsetPipeline | PipelineOperationWithErrors | str

Created pipeline or error message.

deepset_mcp.tools.deploy_pipeline async

deploy_pipeline(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    pipeline_name: str,
    wait_for_deployment: bool = False,
    timeout_seconds: float = 600,
    poll_interval: float = 10,
) -> PipelineValidationResult | str

Deploys a pipeline to production.

This function attempts to deploy the specified pipeline in the given workspace. If the deployment fails due to validation errors, it returns a validation result.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
pipeline_name str

Name of the pipeline to deploy.

required
wait_for_deployment bool

If True, waits for the pipeline to reach DEPLOYED status.

False
timeout_seconds float

Maximum time to wait for deployment when wait_for_deployment is True (default: 600.0).

600
poll_interval float

Time between status checks in seconds when wait_for_deployment is True (default: 10.0).

10

Returns:

Type Description
PipelineValidationResult | str

Deployment validation result or error message.

deepset_mcp.tools.get_pipeline async

get_pipeline(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    pipeline_name: str,
) -> DeepsetPipeline | str

Fetches detailed configuration information for a specific pipeline, identified by its unique pipeline_name.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
pipeline_name str

The name of the pipeline to fetch.

required

Returns:

Type Description
DeepsetPipeline | str

Pipeline details or error message.

deepset_mcp.tools.get_pipeline_logs async

get_pipeline_logs(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    pipeline_name: str,
    limit: int = 30,
    level: LogLevel | None = None,
    after: str | None = None,
) -> PaginatedResponse[PipelineLog] | str

Fetches logs for a specific pipeline.

Retrieves log entries for the specified pipeline, with optional filtering by log level. This is useful for debugging pipeline issues or monitoring pipeline execution.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
pipeline_name str

Name of the pipeline to fetch logs for.

required
limit int

Maximum number of log entries to return (default: 30).

30
level LogLevel | None

Filter logs by level. If None, returns all levels.

None
after str | None

The cursor to fetch the next page of results.

None

Returns:

Type Description
PaginatedResponse[PipelineLog] | str

Pipeline logs or error message.

deepset_mcp.tools.list_pipelines async

list_pipelines(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    after: str | None = None,
) -> PaginatedResponse[DeepsetPipeline] | str

Retrieves a list of all pipeline available within the currently configured deepset workspace.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
after str | None

The cursor to fetch the next page of results. If there are more results to fetch, the cursor will appear as next_cursor on the response.

None

Returns:

Type Description
PaginatedResponse[DeepsetPipeline] | str

List of pipelines or error message.

deepset_mcp.tools.search_pipeline async

search_pipeline(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    pipeline_name: str,
    query: str,
) -> DeepsetSearchResponse | str

Searches using a pipeline.

Uses the specified pipeline to perform a search with the given query. Before executing the search, checks if the pipeline is deployed (status = DEPLOYED). Returns search results.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
pipeline_name str

Name of the pipeline to use for search.

required
query str

The search query to execute.

required

Returns:

Type Description
DeepsetSearchResponse | str

Search results or error message.

deepset_mcp.tools.update_pipeline async

update_pipeline(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    pipeline_name: str,
    original_config_snippet: str,
    replacement_config_snippet: str,
    skip_validation_errors: bool = True,
) -> DeepsetPipeline | PipelineOperationWithErrors | str

Updates a pipeline configuration in the specified workspace with a replacement configuration snippet.

This function validates the replacement configuration snippet before applying it to the pipeline. If the validation fails and skip_validation_errors is False, it returns error messages. Otherwise, the replacement snippet is used to update the pipeline's configuration.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
pipeline_name str

Name of the pipeline to update.

required
original_config_snippet str

The configuration snippet to replace.

required
replacement_config_snippet str

The new configuration snippet.

required
skip_validation_errors bool

If True (default), updates the pipeline even if validation fails. If False, stops update when validation fails.

True

Returns:

Type Description
DeepsetPipeline | PipelineOperationWithErrors | str

Updated pipeline or error message.

deepset_mcp.tools.validate_pipeline async

validate_pipeline(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    yaml_configuration: str,
) -> PipelineValidationResultWithYaml | str

Validates the provided pipeline YAML configuration against the deepset API.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace str

The workspace name.

required
yaml_configuration str

The YAML configuration to validate.

required

Returns:

Type Description
PipelineValidationResultWithYaml | str

Validation result with original YAML or error message.

deepset_mcp.tools.get_template async

get_template(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    template_name: str,
) -> PipelineTemplate | str

Fetches detailed information for a specific pipeline or indexing template, identified by its template_name.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API requests.

required
workspace str

The workspace to fetch template from.

required
template_name str

The name of the template to fetch.

required

Returns:

Type Description
PipelineTemplate | str

Pipeline or indexing template details or error message.

deepset_mcp.tools.list_templates async

list_templates(
    *,
    client: AsyncClientProtocol,
    workspace: str,
    limit: int = 100,
    pipeline_type: PipelineType | str | None = None,
) -> PaginatedResponse[PipelineTemplate] | str

Retrieves a list of all available pipeline and indexing templates.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API requests.

required
workspace str

The workspace to list templates from.

required
limit int

Maximum number of templates to return (default: 100).

100
pipeline_type PipelineType | str | None

The type of pipeline to return.

None

Returns:

Type Description
PaginatedResponse[PipelineTemplate] | str

List of pipeline templates or error message.

deepset_mcp.tools.search_templates async

search_templates(
    *,
    client: AsyncClientProtocol,
    query: str,
    model: ModelProtocol,
    workspace: str,
    top_k: int = 10,
    pipeline_type: PipelineType | str = QUERY,
) -> PipelineTemplateSearchResults | str

Searches for pipeline or indexing templates based on name or description using semantic similarity.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The API client to use.

required
query str

The search query.

required
model ModelProtocol

The model to use for computing embeddings.

required
workspace str

The workspace to search templates from.

required
top_k int

Maximum number of results to return (default: 10).

10
pipeline_type PipelineType | str

The type of pipeline to return ('indexing' or 'query'; default: 'query').

QUERY

Returns:

Type Description
PipelineTemplateSearchResults | str

Search results with similarity scores or error message.

deepset_mcp.tools.get_secret async

get_secret(
    *, client: AsyncClientProtocol, secret_id: str
) -> EnvironmentSecret | str

Retrieves detailed information about a specific secret by its ID.

Use this tool to get information about a specific secret when you know its ID. The secret value itself is not returned for security reasons, only metadata.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The deepset API client

required
secret_id str

The unique identifier of the secret to retrieve

required

Returns:

Type Description
EnvironmentSecret | str

Secret information or error message

deepset_mcp.tools.list_secrets async

list_secrets(
    *,
    client: AsyncClientProtocol,
    limit: int = 10,
    after: str | None = None,
) -> EnvironmentSecretList | str

Lists all secrets available in the user's deepset organization.

Use this tool to retrieve a list of secrets with their names and IDs. This is useful for getting an overview of all secrets before retrieving specific ones.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The deepset API client

required
limit int

Maximum number of secrets to return (default: 10)

10
after str | None

The cursor to fetch the next page of results

None

Returns:

Type Description
EnvironmentSecretList | str

List of secrets or error message

deepset_mcp.tools.get_workspace async

get_workspace(
    *, client: AsyncClientProtocol, workspace_name: str
) -> Workspace | str

Fetches detailed information for a specific workspace by name.

This tool retrieves comprehensive details about a specific workspace, including its unique ID, supported languages, and configuration settings. Use this when you need detailed information about a particular workspace.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required
workspace_name str

The name of the workspace to fetch details for.

required

Returns:

Type Description
Workspace | str

Workspace details or error message.

deepset_mcp.tools.list_workspaces async

list_workspaces(
    *, client: AsyncClientProtocol
) -> list[Workspace] | str

Retrieves a list of all workspaces available to the user.

This tool provides an overview of all workspaces that the user has access to. Each workspace contains information about its name, ID, supported languages, and default idle timeout settings.

Parameters:

Name Type Description Default
client AsyncClientProtocol

The async client for API communication.

required

Returns:

Type Description
list[Workspace] | str

List of workspaces or error message.