search
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." | |
| subject | No | ESCOPO1 (optional): opaque 8-128 char token ([A-Za-z0-9._:-]) that isolates memory to a single person within a shared connect-token. Omit for token-scoped behavior. Never include PII/email. | |
| 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 |