aws / aws/bedrock-agentcore-sdk-python

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

オープン
#567 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
761
フォーク
147
平均マージ
1日 23時間
マージ済み PR(30日)
7

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

AgentCoreToolSearchPlugin とその x_amz_bedrock_agentcore_search ツール呼び出しから始め、次に Strands MCPClient が tool_filters をどのように処理するかを比較します。許可されたツールのフィルターをサポートし、セマンティック検索で許可されたツールだけが考慮されるようにします。また、AgentCoreToolSearchPlugin がサンプルの tool_filters パラメーターを受け入れ、許可されていない結果を除外することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
ai
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。