Stop preserving bounds in tool input schemas (#40966)

## What changed

Remove `minimum`, `maximum`, and `maxLength` from the supported tool input
schema representation. Schema parsing now drops these bounds instead of
including them in generated tool declarations, including declarations for
reserved history and notes tools.

GitOrigin-RevId: b7c7733651e65d38cc3d0cef2efa127ab3f8a32f
This commit is contained in:
Channing Conger authored and copyberry committed 2026-08-26 19:59:08 +00:00
1 parent f74bcd2811
commit ac644ed112
3 files changed
+3 -78

No files matched your search

@@ -172,31 +172,6 @@ async fn app_server_uses_configured_notes_backend_for_context_window_hints(
"app-server should expose {namespace}.{tool_name} to the model"
);
}
// Reserved tools must retain Bridge-compatible constraints in the model request.
for (namespace, tool_name, property, expected) in [
(
"history",
"list_items",
"limit",
json!({"type": "integer", "minimum": 1}),
),
(
"notes",
"search_contents",
"query",
json!({"type": "string"}),
),
] {
let tool = request
.tool_by_name(namespace, tool_name)
.expect("history/notes tool should be exposed");
let mut schema = tool["parameters"]["properties"][property].clone();
schema
.as_object_mut()
.expect("parameter schema")
.remove("description");
assert_eq!(schema, expected, "{namespace}.{tool_name}.{property}");
}
}
assert!(request.tool_by_name("notes", "thread_hint").is_none());