Skip to content

Commit 584def0

Browse files
authored
chore(agent): updates agent config schema (#2891)
1 parent 0c24055 commit 584def0

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

crates/chat-cli/src/cli/chat/tools/custom_tool.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ impl Default for TransportType {
4444

4545
#[derive(Clone, Serialize, Deserialize, Debug, Eq, PartialEq, JsonSchema)]
4646
pub struct CustomToolConfig {
47-
/// The type of transport the mcp server is expecting
47+
/// The type of transport the mcp server is expecting. For http transport, only url (for now)
48+
/// is taken into account.
4849
#[serde(default)]
4950
pub r#type: TransportType,
5051
/// The URL endpoint for HTTP-based MCP servers

schemas/agent-v1.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@
1616
},
1717
"required": ["command"]
1818
}
19+
},
20+
"TransportType": {
21+
"oneOf": [
22+
{
23+
"description": "Standard input/output transport (default)",
24+
"type": "string",
25+
"const": "stdio"
26+
},
27+
{
28+
"description": "HTTP transport for web-based communication",
29+
"type": "string",
30+
"const": "http"
31+
}
32+
]
1933
}
2034
},
2135
"properties": {
@@ -49,9 +63,20 @@
4963
"additionalProperties": {
5064
"type": "object",
5165
"properties": {
66+
"type": {
67+
"description": "The type of transport the mcp server is expecting. For http transport, only url (for now) is taken into account",
68+
"$ref": "#/$definitions/TransportType",
69+
"default": "stdio"
70+
},
71+
"url": {
72+
"description": "The URL endpoint for HTTP-based MCP servers",
73+
"type": "string",
74+
"default": ""
75+
},
5276
"command": {
5377
"description": "The command string used to initialize the mcp server",
54-
"type": "string"
78+
"type": "string",
79+
"default": ""
5580
},
5681
"args": {
5782
"description": "A list of arguments to be used to run the command with",

0 commit comments

Comments
 (0)