Remove template IDs from MCP tool call metadata (#33467)

## What changed

- Remove `template_id` from MCP tool call items and lifecycle events.
- Remove `templateId` from app-server `McpToolCallAppContext` responses and generated schemas.
- Update protocol conversions, documentation, and existing test expectations for the revised metadata shape.

GitOrigin-RevId: f2b1304eadff661eec3966673ea71206b1542b98
This commit is contained in:
Martin Au-Yeung authored and copyberry committed 2026-07-16 01:23:52 +00:00
1 parent be39aab9f4
commit 800715d201
33 files changed
+2 -173

No files matched your search

@@ -398,7 +398,6 @@ pub struct McpToolCallAppContext {
pub link_id: Option<String>,
pub resource_uri: Option<String>,
pub app_name: Option<String>,
pub template_id: Option<String>,
pub action_name: Option<String>,
}
@@ -950,7 +949,6 @@ impl From<CoreTurnItem> for ThreadItem {
link_id: mcp.link_id,
resource_uri: mcp.mcp_app_resource_uri.clone(),
app_name: mcp.app_name,
template_id: mcp.template_id,
action_name: mcp.action_name,
}),
mcp_app_resource_uri: mcp.mcp_app_resource_uri,
@@ -2877,7 +2877,6 @@ fn core_turn_item_into_thread_item_converts_supported_variants() {
mcp_app_resource_uri: Some("app://connector".to_string()),
link_id: Some("link_calendar".to_string()),
app_name: Some("Calendar".to_string()),
template_id: Some("calendar_template".to_string()),
action_name: Some("create_event".to_string()),
plugin_id: Some("sample@test".to_string()),
status: CoreMcpToolCallStatus::InProgress,
@@ -2899,7 +2898,6 @@ fn core_turn_item_into_thread_item_converts_supported_variants() {
link_id: Some("link_calendar".to_string()),
resource_uri: Some("app://connector".to_string()),
app_name: Some("Calendar".to_string()),
template_id: Some("calendar_template".to_string()),
action_name: Some("create_event".to_string()),
}),
mcp_app_resource_uri: Some("app://connector".to_string()),
@@ -2919,7 +2917,6 @@ fn core_turn_item_into_thread_item_converts_supported_variants() {
mcp_app_resource_uri: None,
link_id: None,
app_name: None,
template_id: None,
action_name: None,
plugin_id: None,
status: CoreMcpToolCallStatus::Completed,
@@ -2968,7 +2965,6 @@ fn mcp_tool_call_app_context_serializes_connector_id() {
link_id: Some("link_calendar".to_string()),
resource_uri: Some("app://connector".to_string()),
app_name: Some("Calendar".to_string()),
template_id: Some("calendar_template".to_string()),
action_name: Some("create_event".to_string()),
}),
mcp_app_resource_uri: Some("app://connector".to_string()),
@@ -2992,7 +2988,6 @@ fn mcp_tool_call_app_context_serializes_connector_id() {
"linkId": "link_calendar",
"resourceUri": "app://connector",
"appName": "Calendar",
"templateId": "calendar_template",
"actionName": "create_event",
},
"mcpAppResourceUri": "app://connector",
@@ -3012,7 +3007,6 @@ fn mcp_tool_call_app_context_serializes_missing_mixed_version_fields_as_null() {
link_id: None,
resource_uri: None,
app_name: None,
template_id: None,
action_name: None,
})
.expect("MCP tool call app context should serialize"),
@@ -3021,7 +3015,6 @@ fn mcp_tool_call_app_context_serializes_missing_mixed_version_fields_as_null() {
"linkId": null,
"resourceUri": null,
"appName": null,
"templateId": null,
"actionName": null,
})
);