aws / aws/bedrock-agentcore-sdk-python

[Feature request] AgentCoreToolSearchPlugin: add tool_filters support to restrict tools resolved from AgentCore Gateway

Aperta
#567 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
761
Fork
147
Merge medio
1g 23h
PR unite (30g)
7

Descrizione

**Is your feature request related to a problem? Please describe.**
When using AgentCoreToolSearchPlugin with AgentCore Gateway, there is currently no way to restrict which tools are surfaced to the agent. The plugin performs semantic search over the full set of tools registered in the Gateway, which can include dozens of tools. Without filtering, the semantic search may surface unintended tools, which increases noise, wastes tokens, and can cause the agent to invoke tools it should not have access to.

**Describe the solution you'd like**
AgentCoreToolSearchPlugin should support a tool_filters parameter, mirroring the tool_filters parameter already available on Strands' MCPClient:
```python
# Current Strands MCPClient — already supports filtering
MCPClient(
...,
tool_filters={"allowed": ["tool-1", "tool-2"]}
)

# Desired — AgentCoreToolSearchPlugin parity
AgentCoreToolSearchPlugin(
...,
tool_filters={"allowed": ["tool-1", "tool-2"]}
)
```
Ideally, the filter should be applied before (or at query time during) the semantic search, so that only candidate tools matching the allowlist are considered. If not possible, it can be done after query result I guess inside the `x_amz_bedrock_agentcore_search` tool call.

**Describe alternatives you've considered**
Post-filtering after semantic search with the post tool call hook and discarding results that don't match the allowlist. This works but should be natively supported by the plugin.

**Additional context**
N/A

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con AgentCoreToolSearchPlugin e la relativa chiamata allo strumento x_amz_bedrock_agentcore_search, quindi confronta il modo in cui Strands MCPClient gestisce tool_filters. Aggiungi il supporto per un filtro degli strumenti consentiti, in modo che la ricerca semantica consideri solo gli strumenti consentiti, e verifica che AgentCoreToolSearchPlugin accetti il parametro di esempio tool_filters ed escluda i risultati non consentiti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
ai
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.