Preserve MCP namespace descriptions in the tool catalog cache (#38623)

## What changed

Keep MCP namespace descriptions when publishing tool definitions to the
process-scoped catalog cache. Cached definitions now expose the server
instructions to the model before a lazily started MCP connection finishes
initializing.

## Testing

Update the cached MCP startup integration test to verify that cached namespace
descriptions retain the originating server instructions.

GitOrigin-RevId: d1b73381852fd43c6b54a7c22a599474c774dc20
This commit is contained in:
jif authored and copyberry committed 2026-08-14 18:35:13 +00:00
1 parent 478215c5c1
commit 42b5f05cef
2 files changed
+2 -4

No files matched your search

@@ -161,8 +161,6 @@ impl McpToolCatalogCacheContext {
let mut tools = tools.to_vec();
for tool in &mut tools {
// Initialize instructions belong to one live connection and must not cross sessions.
tool.namespace_description = None;
// Tool annotations affect approval and parallelism decisions, so only the live
// connection may supply them.
tool.tool.annotations = None;