aws / aws/bedrock-agentcore-sdk-python

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

Abierto
#567 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
761
Forks
147
Merge medio
1 d 23 h
PR fusionados (30 d)
7

Descripción

**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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con AgentCoreToolSearchPlugin y su llamada a la herramienta x_amz_bedrock_agentcore_search; después, compara cómo Strands MCPClient gestiona tool_filters. Añade compatibilidad con un filtro de herramientas permitidas para que la búsqueda semántica considere únicamente las herramientas permitidas, y verifica que AgentCoreToolSearchPlugin acepte el parámetro de ejemplo tool_filters y excluya los resultados no permitidos.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
ai
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
68/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.