Skip to content

Commit 3a18033

Browse files
authored
fix: Remove incorrect discriminator on McpServer type (#292)
This doesn't have a true discriminator because the stdio variant doesn't have a type field.
1 parent 3c46ea6 commit 3a18033

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

rust/agent.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,6 @@ impl SetSessionModeResponse {
961961
/// See protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)
962962
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
963963
#[serde(tag = "type", rename_all = "snake_case")]
964-
#[schemars(extend("discriminator" = {"propertyName": "type"}))]
965964
#[non_exhaustive]
966965
pub enum McpServer {
967966
/// HTTP transport configuration

schema/schema.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,10 +1344,7 @@
13441344
"description": "Stdio transport configuration\n\nAll Agents MUST support this transport."
13451345
}
13461346
],
1347-
"description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)",
1348-
"discriminator": {
1349-
"propertyName": "type"
1350-
}
1347+
"description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)"
13511348
},
13521349
"McpServerHttp": {
13531350
"description": "HTTP transport configuration for MCP.",

schema/schema.unstable.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,10 +1423,7 @@
14231423
"description": "Stdio transport configuration\n\nAll Agents MUST support this transport."
14241424
}
14251425
],
1426-
"description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)",
1427-
"discriminator": {
1428-
"propertyName": "type"
1429-
}
1426+
"description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)"
14301427
},
14311428
"McpServerHttp": {
14321429
"description": "HTTP transport configuration for MCP.",

0 commit comments

Comments
 (0)