多すぎる検索結果を絞り込む
limitを上げる前にscopeとpathのfilterを追加します。scopeを指定しないqueryでlimitを広げても、signalではなくnoiseが増えるだけです。
search_memory({
query: "token identity fallback",
limit: 5
})公開 MCP ツール
search_memory
用途
認可されたXMemo memoryをstrict targeted-match semanticsで検索し、弱いmatchを暗黙に回答として扱わないようにします。
適用シーン
- callerが関連するproject、team、path、memory typeを把握しており、targeted lookupが必要な場合。
- 弱いsemantic matchをresultとして提示すると誤解を招く、または安全でない場合。
- 明示的なscope/team filter、retrieval explanation、またはより大きく管理されたresult setが必要な場合。
非推奨シーン
- quickでunscopedなforgiving lookupには使わないでください。recallを使います。
- multi-memory prompt context packの構築には使わないでください。recall_contextを使います。
- memoryのmutateやremoveには使わないでください。
- REST APIはpublic MCP toolより広いfield setを受け付けます。scope、bucket、team、provenance filterについては/docs/api/memoryを参照してください。
必須スコープ
- memory:readが必要です。scopeとteam_id filterでcallerのauthorization boundaryを広げることはできません。
パラメーター
| 名前 | 型 | 説明 |
|---|---|---|
query | string · 必須 | 一致させるexact topicまたはwordingです。 |
limit | integer · デフォルト: 5 | 結果数です。 |
path_filter | string · デフォルト: % | Claude plugin profile専用のlogical-path ILIKE filterです。Generic public profileでは受け付けません。 |
memory_type | string · デフォルト: % | Claude plugin profile専用のmemory type filterです。Generic public profileでは受け付けません。 |
prefer_working | boolean · デフォルト: false | Claude plugin profile専用です。vector resultよりactive working stateを先に配置します。 |
返却スキーマ
opaque reference、location、content、任意のexplanation/agent-boundary metadataを含むranked text responseです。Resultは認可されたmemoryだけに制限されます。
使用例
search_memory({
query: "token identity fallback",
limit: 5
})エラー
- 401/403: requestにmemory:readがない、または選択したscope/teamにアクセスできません。
- Validation failure: query、limit、path pattern、またはmemory typeが無効です。
- No-match response: targetと認可されたfilterを同時に満たすstrong resultがありません。callerは暗黙にrecall semanticsへ置き換えないでください。
関連ツール
- recall — strict matchingが不要な場合はforgiving best-effort retrievalを使います。
- recall_context — prompt contextにはbounded multi-memory retrievalを使います。
- forget — 返されたreferenceを確認してからexact recordを削除します。
出典: MCPツールサーフェス