Skip to content

Add tools to fetch pipeline templates #34

@mathislucka

Description

@mathislucka

Overview

We want to add tools and mcp tools that allows our users to fetch a single pipeline and to list pipeline templates.
The tools will use the PipelineTemplateResource to either list pipeline templates or get a single template.

Context

  • have a look at the tools in src/deepset_mcp/tools/pipeline.py to see how we define tools
  • check out src/deepset_mcp/tools/formatting_utils.py to see how we serialize the Pipeline models to strings
  • the PipelineTemplateResource is in src/deepset_mcp/api/pipeline_template/resource.py
  • relevant models are in src/deepset_mcp/api/pipeline_template/models.py
  • refer to src/deepset_mcp/main.py to see how we use tools with mcp

Requirements

  • we have 2 tools (list_pipeline_templates, get_pipeline_template)
  • both tools can also be used with MCP
  • the tools follow the same structure as for the pipeline tools
  • answers are serialized to strings (extract logic into separate helper functions)
  • errors are also returned as strings
  • the mcp tools are added to main.py

Testing

  • all tests go into the test directory
  • refer to test/unit/tools/test_pipeline.py to see how we test tools
  • create ONLY unit tests for the pipeline template tools
  • use a FakePipelineTemplateResource in the tests
  • we do not test the mcp tools
  • tests need full type annotations (including return types)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions