File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
crates/chat-cli/src/cli/chat Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1228,7 +1228,7 @@ fn process_tool_specs(
1228
1228
// This ensures all tool names are valid identifiers that can be safely used in the system
1229
1229
// If after all of the aforementioned modification the combined tool
1230
1230
// name we have exceeds a length of 64, we surface it as an error
1231
- for spec in specs {
1231
+ for spec in specs. iter_mut ( ) {
1232
1232
let sn = if !regex. is_match ( & spec. name ) {
1233
1233
let mut sn = sanitize_name ( spec. name . clone ( ) , regex, & mut hasher) ;
1234
1234
while tn_map. contains_key ( & sn) {
@@ -1255,6 +1255,9 @@ fn process_tool_specs(
1255
1255
spec. name = full_name;
1256
1256
spec. tool_origin = ToolOrigin :: McpServer ( server_name. to_string ( ) ) ;
1257
1257
}
1258
+ // Native origin is the default, and since this function never reads native tools, if we still
1259
+ // have it, that would indicate a tool that should not be included.
1260
+ specs. retain ( |spec| !matches ! ( spec. tool_origin, ToolOrigin :: Native ) ) ;
1258
1261
// Send server load success metric datum
1259
1262
let conversation_id = conversation_id. to_string ( ) ;
1260
1263
let _ = telemetry. send_mcp_server_init ( conversation_id, None , number_of_tools) ;
Original file line number Diff line number Diff line change 16
16
"version" : " 1.10.2" ,
17
17
"title" : " Version 1.10.2" ,
18
18
"changes" : [
19
+ {
20
+ "type" : " fixed" ,
21
+ "description" : " Unqualified tools from being included in the tools schema - [#84](https://github.com/aws/amazon-q-developer-cli-autocomplete/pull/84)"
22
+ },
19
23
{
20
24
"type" : " fixed" ,
21
25
"description" : " Update stalled stream protection to 12s - [#75](https://github.com/aws/amazon-q-developer-cli-autocomplete/pull/75)"
You can’t perform that action at this time.
0 commit comments