# search

관련 문구나 record를 미리 알 수 없을 때 승인된 memory를 검색합니다.

- Canonical: https://docs.xmemo.dev/ko/docs/tools/search
- Locale: ko-KR
- Content-Locale: ko-KR
- Canonical-Content-Digest: e4c087a8f0e12c7c67bbf556d6d2f73b0e61a736a9b8686e77e1b181a14238a7
- Edition-Digest: ac266d2f2e657cc7105791e8eaa9c16895ca9c26a9834511665ec85cb60b5f45
- Source-Revision: sha256:0f9b76db3972abc862d49a83f61e83eed6529dc4507a3c290949f892dcaa48f9

## Tool Reference: `search_memory`

### Purpose

승인된 XMemo memory를 strict targeted-match 의미로 검색하여 약한 match가 조용히 answer로 처리되지 않게 합니다.

### Parameters

- `query` (string, required): 일치시킬 정확한 topic 또는 wording입니다.
- `limit` (integer, optional, default: 5): 결과 수입니다.
- `path_filter` (string, optional, default: %): Claude plugin profile 전용 logical-path ILIKE filter입니다. Generic public profile에서는 허용되지 않습니다.
- `memory_type` (string, optional, default: %): Claude plugin profile 전용 memory type filter입니다. Generic public profile에서는 허용되지 않습니다.
- `prefer_working` (boolean, optional, default: false): Claude plugin profile 전용입니다. vector 결과보다 active working state를 먼저 배치합니다.

### Returns

opaque reference, location, content 및 선택적 explanation/agent-boundary metadata를 포함한 ranked text 응답입니다. 결과도 승인된 memory로 제한됩니다.

### Errors

- 401/403: 요청에 memory:read가 없거나 선택한 scope/team에 접근할 수 없습니다.
- Validation failure: query, limit, path pattern 또는 memory type이 유효하지 않습니다.
- No-match response: target과 승인된 filter를 만족하는 강한 결과가 없습니다. 호출자는 recall 의미를 조용히 대신 사용해서는 안 됩니다.

### Examples

#### 엄격한 project 범위 lookup



```typescript
search_memory({
  query: "token identity fallback",
  limit: 5
})
```

### Related Tools

- [recall](/docs/tools/recall): 엄격한 matching이 필요하지 않을 때 forgiving best-effort retrieval을 사용합니다.
- [recall_context](/docs/tools/recall-context): prompt context에는 범위가 제한된 multi-memory retrieval을 사용합니다.
- [forget](/docs/tools/forget): 반환된 reference를 검토한 후에만 정확한 record를 제거합니다.

## 너무 많은 결과가 나오는 검색 좁히기

limit을 늘리기 전에 scope와 path filter를 추가합니다. scope가 없는 query에서 limit만 넓히면 signal이 아니라 noise가 늘어납니다.

```ts
search_memory({
  query: "token identity fallback",
  limit: 5
})
```

