Google Integration

class agentstr.mcp.google.NostrMCPTool(nostr_mcp_client: NostrMCPClient, tool: dict[str, Any])[source]

Bases: BaseTool

__init__(nostr_mcp_client: NostrMCPClient, tool: dict[str, Any])[source]
async run_async(*, args, tool_context: ToolContext)[source]

Runs the tool asynchronously.

Parameters:
  • args – The arguments as a dict to pass to the tool.

  • tool_context – The tool context from upper level ADK agent.

Returns:

The response from the tool.

Return type:

Any

async agentstr.mcp.google.to_google_tools(nostr_mcp_client: NostrMCPClient) list[BaseTool][source]

Convert tools from the MCP client to Google tools.

Parameters:

nostr_mcp_client – An instance of NostrMCPClient to fetch tools from.

Returns:

A list of Google FunctionTool objects that wrap the MCP tools.

This module provides integration with Google tools, such as those used with Gemini, allowing for the use of MCP-defined tools within Google’s ecosystem.