8000 chore: Update the comments of MCPTool · devevignesh/adk-python@d129fd6 · GitHub
[go: up one dir, main page]

Skip to content

Commit d129fd6

Browse files
seanzhougooglecopybara-github
authored andcommitted
chore: Update the comments of MCPTool
PiperOrigin-RevId: 771234262
1 parent 131957c commit d129fd6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/google/adk/tools/mcp_tool/mcp_tool.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050

5151
class MCPTool(BaseTool):
52-
"""Turns a MCP Tool into a Vertex Agent Framework Tool.
52+
"""Turns an MCP Tool into an ADK Tool.
5353
5454
Internally, the tool initializes from a MCP Tool, and uses the MCP Session to
5555
call the tool.
@@ -63,9 +63,9 @@ def __init__(
6363
auth_scheme: Optional[AuthScheme] = None,
6464
auth_credential: Optional[AuthCredential] = None,
6565
):
66-
"""Initializes a MCPTool.
66+
"""Initializes an MCPTool.
6767
68-
This tool wraps a MCP Tool interface and uses a session manager to
68+
This tool wraps an MCP Tool interface and uses a session manager to
6969
communicate with the MCP server.
7070
7171
Args:
@@ -111,14 +111,13 @@ async def run_async(self, *, args, tool_context: ToolContext):
111111
112112
Args:
113113
args: The arguments as a dict to pass to the tool.
114-
tool_context: The tool context from upper level ADK agent.
114+
tool_context: The tool context of the current invocation.
115115
116116
Returns:
117117
Any: The response from the tool.
118118
"""
119119
# Get the session from the session manager
120120
session = await self._mcp_session_manager.create_session()
121121

122-
# TODO(cheliu): Support passing tool context to MCP Server.
123122
response = await session.call_tool(self.name, arguments=args)
124123
return response

0 commit comments

Comments
 (0)
0