search
Retrieve persisted memory from agent or tenant scopes using full-text search. Provide a human-readable reason to access plaintext results, enabling cross-agent discovery or targeted recall.
Instructions
Search persisted memory across agent scopes using full-text matching. Governance: requires reason (10–200 chars) because results contain plaintext content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results to return (1–50, default: 20). | |
| query | Yes | Search query — natural language or keywords. | |
| scope | No | Explicit search scope. "agent" (default, fail-closed) = limits search to the given agent_id (or the token agent). "tenant" = cross-agent search within the authenticated tenant. If omitted with agent_id present, "agent" is inferred; if both omitted, the token agent is used (verified-token scope). | |
| reason | Yes | REQUIRED (10–200 chars). Audit policy: MEMORY_EXPORT_GOVERNANCE_V1. Human-readable justification for retrieving PLAINTEXT memory. Without this parameter the call WILL fail with code -32602. Example: "Checking prior migration decisions for the user." | |
| agent_id | No | Agent identifier (canonical or alias). Used only when scope="agent" or scope is inferred. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| scope | Yes | ||
| results | Yes |