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)
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
Requirements
Testing
testdirectory