googleapis / googleapis/python-genai
Allow `allowed_tools` for MCP function calling
Aperta
priority: p3
type: feature request
- Lingua principale
- Python
- Stelle
- 4k
- Fork
- 1k
- Merge medio
- 2g 12h
- PR unite (30g)
- 41
Descrizione
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!
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.