Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/google/adk/tools/mcp_tool/mcp_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
REQUEST_CONFIRMATION_FUNCTION_CALL_NAME,
REQUEST_INPUT_FUNCTION_CALL_NAME,
transfer_to_agent.__name__,
# Injected by the output-schema processor whenever output_schema is set
# alongside other tools (flows/llm_flows/prompt/_schema.py) and read back
# by name in base_llm_flow.py, so it is a framework-owned wire name too.
# Spelled out because the function is defined inside
# SetModelResponseTool.__init__ and is not importable.
'set_model_response',
})

_UNSET = object()
Expand Down
1 change: 1 addition & 0 deletions tests/unittests/tools/mcp_tool/test_mcp_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ def test_init_with_empty_description(self):
"adk_request_confirmation",
"adk_request_input",
"transfer_to_agent",
"set_model_response",
],
)
def test_init_reserved_name(self, reserved_name):
Expand Down
1 change: 1 addition & 0 deletions tests/unittests/tools/mcp_tool/test_mcp_toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ async def test_get_tools_skips_reserved_names(self):
MockMCPTool("adk_request_credential"),
MockMCPTool("adk_request_confirmation"),
MockMCPTool("adk_request_input"),
MockMCPTool("set_model_response"),
]
self.mock_session.list_tools = AsyncMock(
return_value=MockListToolsResult(mock_tools)
Expand Down