aws / aws/bedrock-agentcore-sdk-python
[Feature request] AgentCoreToolSearchPlugin: add tool_filters support to restrict tools resolved from AgentCore Gateway
- Langage dominant
- Python
- Étoiles
- 761
- Forks
- 147
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 7
Description
**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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par AgentCoreToolSearchPlugin et son appel d’outil x_amz_bedrock_agentcore_search, puis comparez la manière dont Strands MCPClient gère tool_filters. Ajoutez la prise en charge d’un filtre d’outils autorisés afin que la recherche sémantique ne prenne en compte que les outils autorisés, et vérifiez que AgentCoreToolSearchPlugin accepte le paramètre d’exemple tool_filters et exclut les résultats non autorisés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- ai
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 68/100