Skip to content

Commit 33432e8

Browse files
committed
fix(tools): update tool descriptions and annotations
To fix the breaking changes from the mcp SDK Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
1 parent ef84499 commit 33432e8

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

crates/mcp-server/src/tools.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ fn get_builtin_tools() -> Vec<Tool> {
126126
},
127127
Tool {
128128
name: Cow::Borrowed("get-policy"),
129-
description: Cow::Borrowed(
129+
description: Some(Cow::Borrowed(
130130
"Gets the policy information for a specific component",
131-
),
131+
)),
132132
input_schema: Arc::new(
133133
serde_json::from_value(json!({
134134
"type": "object",
@@ -142,12 +142,13 @@ fn get_builtin_tools() -> Vec<Tool> {
142142
}))
143143
.unwrap_or_default(),
144144
),
145+
annotations: None,
145146
},
146147
Tool {
147148
name: Cow::Borrowed("grant-storage-permission"),
148-
description: Cow::Borrowed(
149+
description: Some(Cow::Borrowed(
149150
"Grants storage access permission to a component, allowing it to read from and/or write to specific storage locations."
150-
),
151+
)),
151152
input_schema: Arc::new(
152153
serde_json::from_value(json!({
153154
"type": "object",
@@ -180,12 +181,13 @@ fn get_builtin_tools() -> Vec<Tool> {
180181
}))
181182
.unwrap_or_default(),
182183
),
184+
annotations: None,
183185
},
184186
Tool {
185187
name: Cow::Borrowed("grant-network-permission"),
186-
description: Cow::Borrowed(
188+
description: Some(Cow::Borrowed(
187189
"Grants network access permission to a component, allowing it to make network requests to specific hosts."
188-
),
190+
)),
189191
input_schema: Arc::new(
190192
serde_json::from_value(json!({
191193
"type": "object",
@@ -210,6 +212,7 @@ fn get_builtin_tools() -> Vec<Tool> {
210212
}))
211213
.unwrap_or_default(),
212214
),
215+
annotations: None,
213216
},
214217
]
215218
}

0 commit comments

Comments
 (0)