googleapis / googleapis/python-genai

Allow `allowed_tools` for MCP function calling

Aperta
#1,089 2 commenti 0 reazioni 1 assegnatario Rivendicata da @Venkaiahbabuneelam Vedi su GitHub
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.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.