Fix MCP denial assertion for structured output (#40748)

## What changed

Update the attachment-owned permissions test to read the denial message from
the text content item in the restricted MCP tool's structured output.

GitOrigin-RevId: a4b219b6f14f1b40e8c586147f535748b1770b13
This commit is contained in:
andrewgu-oai
2026-08-26 01:02:52 +00:00
committed by copyberry
parent dc08ace782
commit 00b7152a60
+3 -2
View File
@@ -1831,8 +1831,9 @@ async fn stdio_mcp_tool_call_includes_sandbox_state_meta(
let final_request = final_mock.single_request();
if attachment_owned_permissions {
let restricted_output = final_request
.function_call_output_text(restricted_call_id)
let restricted_output_item = final_request.function_call_output(restricted_call_id);
let restricted_output = restricted_output_item["output"][1]["text"]
.as_str()
.expect("restricted MCP tool should produce a denied call output");
assert!(
restricted_output