Skip to content

Commit 7958a12

Browse files
erraggyclaude
andauthored
fix(mcp): use correct hyphenated collision strategy names in join tool (#330)
The jsonschema descriptions and tool description documented join strategies as accept_left/accept_right but the joiner package uses accept-left/accept-right, causing LLMs to always pass invalid values. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 112a9b9 commit 7958a12

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/mcpserver/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func registerAllTools(server *mcp.Server) {
5252

5353
mcp.AddTool(server, &mcp.Tool{
5454
Name: "join",
55-
Description: "Join multiple OpenAPI Specification documents into a single merged document. Requires at least 2 specs via the specs array. Collision strategies: accept_left, accept_right, fail (paths/schemas), rename (schemas only). Use semantic_dedup to merge equivalent schemas.",
55+
Description: "Join multiple OpenAPI Specification documents into a single merged document. Requires at least 2 specs via the specs array. Collision strategies: accept-left, accept-right, fail (paths/schemas), rename (schemas only). Use semantic_dedup to merge equivalent schemas.",
5656
}, handleJoin)
5757

5858
mcp.AddTool(server, &mcp.Tool{

internal/mcpserver/tools_join.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313

1414
type joinInput struct {
1515
Specs []specInput `json:"specs" jsonschema:"Array of OAS documents to join (minimum 2)"`
16-
PathStrategy string `json:"path_strategy,omitempty" jsonschema:"Strategy for path collisions: accept_left or accept_right or fail"`
17-
SchemaStrategy string `json:"schema_strategy,omitempty" jsonschema:"Strategy for schema collisions: accept_left or accept_right or fail or rename"`
16+
PathStrategy string `json:"path_strategy,omitempty" jsonschema:"Strategy for path collisions: accept-left or accept-right or fail"`
17+
SchemaStrategy string `json:"schema_strategy,omitempty" jsonschema:"Strategy for schema collisions: accept-left or accept-right or fail or rename"`
1818
SemanticDedup bool `json:"semantic_dedup,omitempty" jsonschema:"Enable semantic deduplication of equivalent schemas"`
1919
Output string `json:"output,omitempty" jsonschema:"File path to write joined document. If omitted the result is returned inline."`
2020
}

0 commit comments

Comments
 (0)