Skip to content

Commit ae5bd09

Browse files
tholorclaude
andauthored
fix: create_pipeline tool kwarg mismatch with PipelineResource (#207)
The create_pipeline tool called PipelineResource.create(name=...) but the implementation expects pipeline_name=..., causing the tool to fail with "got an unexpected keyword argument 'name'". The protocol declared the parameter as `name` while the implementation used `pipeline_name`, so tests against mocks passed but real calls failed. Aligned the protocol, mocks, and caller on `pipeline_name` to match the implementation and the rest of the pipeline resource API. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 242a3c3 commit ae5bd09

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/deepset_mcp/api/pipeline/protocols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async def list(self, limit: int = 10, after: str | None = None) -> PaginatedResp
3232
"""List pipelines in the configured workspace with optional pagination."""
3333
...
3434

35-
async def create(self, name: str, yaml_config: str) -> NoContentResponse:
35+
async def create(self, pipeline_name: str, yaml_config: str) -> NoContentResponse:
3636
"""Create a new pipeline with a name and YAML config."""
3737
...
3838

src/deepset_mcp/tools/pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ async def create_pipeline(
128128
error_messages = [f"{error.code}: {error.message}" for error in validation_response.errors]
129129
return "Pipeline validation failed:\n" + "\n".join(error_messages)
130130

131-
await client.pipelines(workspace=workspace).create(name=pipeline_name, yaml_config=yaml_configuration)
131+
await client.pipelines(workspace=workspace).create(pipeline_name=pipeline_name, yaml_config=yaml_configuration)
132132

133133
# Get the full pipeline after creation
134134
pipeline = await client.pipelines(workspace=workspace).get(pipeline_name)

test/unit/tools/test_doc_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def list(
7777
) -> PaginatedResponse[DeepsetPipeline]:
7878
raise NotImplementedError
7979

80-
async def create(self, name: str, yaml_config: str) -> NoContentResponse:
80+
async def create(self, pipeline_name: str, yaml_config: str) -> NoContentResponse:
8181
raise NotImplementedError
8282

8383
async def list_versions(

test/unit/tools/test_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async def validate(self, yaml_config: str) -> PipelineValidationResult:
139139
return self._validate_response
140140
raise NotImplementedError
141141

142-
async def create(self, name: str, yaml_config: str) -> NoContentResponse:
142+
async def create(self, pipeline_name: str, yaml_config: str) -> NoContentResponse:
143143
if self._create_exception:
144144
raise self._create_exception
145145
if self._create_response is not None:

0 commit comments

Comments
 (0)