Hey there, I'm using Gemini's SDK with an MCP server and noticed there's no way to restrict which tools the model can call. Currently, I'm doing:
GenerateContentConfig(
system_instruction=system_message,
temperature=0,
tools=[mcp_client.session],
)
This gives access to all tools, but I'd like to allow only specific one, similar to allowed_tools in OpenAI's or Anthropic's SDKs. Would be great to have something like:
tools=[mcp_client.session.with_allowed_tools(["tool_a", "tool_b"])]
Thanks in advance!
Reactions are currently unavailable
Hey there, I'm using Gemini's SDK with an MCP server and noticed there's no way to restrict which tools the model can call. Currently, I'm doing:
GenerateContentConfig( system_instruction=system_message, temperature=0, tools=[mcp_client.session], )This gives access to all tools, but I'd like to allow only specific one, similar to allowed_tools in OpenAI's or Anthropic's SDKs. Would be great to have something like:
tools=[mcp_client.session.with_allowed_tools(["tool_a", "tool_b"])]
Thanks in advance!