File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,9 +58,7 @@ def agent_platform_to_gemini_tool(tool: McpTool) -> types.Tool:
5858 {
5959 "name" : tool .name ,
6060 "description" : tool .description ,
61- "parameters_json_schema" : _filter_to_supported_schema (
62- tool .inputSchema
63- ),
61+ "parameters_json_schema" : tool .inputSchema ,
6462 }
6563 ]
6664 )
Original file line number Diff line number Diff line change @@ -276,3 +276,28 @@ def test_update_endpoint_labels_conversion():
276276 labels_schema = schema ['properties' ]['endpoint' ]['properties' ]['labels' ]
277277
278278 assert 'additionalProperties' in labels_schema
279+
280+
281+ def test_agent_platform_preserves_unknown_fields ():
282+ """Test that Agent Platform translation passes all schema fields directly
283+ to the backend.
284+ """
285+ mcp_tools = [
286+ mcp_types .Tool (
287+ name = 'tool' ,
288+ description = 'tool-description' ,
289+ inputSchema = {
290+ 'type' : 'object' ,
291+ 'properties' : {},
292+ # A new unknown field
293+ 'some_new_future_field' : 'value' ,
294+ },
295+ ),
296+ ]
297+
298+ result = _mcp_utils .mcp_to_gemini_tools (mcp_tools , is_agent_platform = True )
299+ schema = result [0 ].function_declarations [0 ].parameters_json_schema
300+
301+ # Verify the entire schema is passed through intact, including the unknown field
302+ assert 'some_new_future_field' in schema
303+ assert schema ['some_new_future_field' ] == 'value'
You can’t perform that action at this time.
0 commit comments