Search
searchSearch what you can read, and get back hits you can cite: each has a citation (location@commit, and #span for a block), its freshness (when committed; for a mirror, when it last synced and who connected it) and a trust signal (verified_truth, stated_truth, mirror or text) with the truths about it. A document hit also carries matched: why it matched, strongest first (titles, labels, text, meaning). score names no strategy, so matched is the only field that says which of them found the hit. PUBLIC GITHUB, a separate corpus: scope "public" searches agent instruction files (skills, CLAUDE.md, AGENTS.md, cursor rules, copilot instructions, llms.txt) written by strangers, not your organization. They come back only in public, never in hits: 5 by default (limit up to 20), each a pointer with its licence, capabilities (what it would have an agent do), stars, whether its publisher is known, when its repository's agent context changed, a commit-pinned citation, a link for a person, a sourceLink to GitHub (readable whatever the licence) and an agentlefs://public/ URI. The citation and sourceLink are portable references; the uri pins no commit. No field proves one file changed. licensed_only keeps the files whose text may be served. With within owner/repo/path (or the URI) it opens one file in file: its text if licensed, otherwise a description and the link; a long file comes in parts of up to 50,000 bytes (max_bytes for smaller ones), the next by offset; the file's own text is everything above the last ──── end of … line, less its last two line breaks, and an entry before it says it is public. A public query needs two characters or more. With export "skills" (and no query) it lists the WHOLE public skills collection instead, in export: one row per distinct skill file as its canonical copy (repository, path, name, description, stars, licence, size, dates, copies, trend, links), never a file's text, up to 5,000 rows a page (export_rows for fewer); next is the cursor for the page after, total the row count. Each page is one call against your delegation chain's public allowance (60 calls per 60s, shared with public searches and file reads), so the whole collection costs total ÷ 5,000 calls, rounded up: 100 for 500,000 files. A signed-in person downloads the same rows as one file at /api/context/export. Your own folder named public is scope /public. how: auto (default) runs every strategy and merges them; meaning ranks by what a passage is about; text matches the words in a body; titles finds a document by name (file name, title or frontmatter aliases, typo-tolerant, and the excerpt says which name matched). Documents come best first, and a document hit's score is the quantity they were ordered by, comparable only within one answer; a hit's line, when set, is the line its excerpt is from. Narrow it with scope (a location), within (one document: returns its matching spans), thread (a message id: searches that thread), or source (one connected source, by id or a location in it). follow (1-3) adds the links around each hit. Nothing you cannot read is returned or counted. Hits are documents, their spans, messages, and published knowledge (lessons, dead ends, workflows, skills): a knowledge hit cites knowledge:@v, is dated by its last change, and its trust is validated_knowledge, unvalidated_knowledge or refuted_knowledge. Knowledge matches the query as one phrase, so a key term finds a lesson where a whole question may not; drafts are never returned. skills names the skills (.claude/skills or .agents/skills) and memory names the CLAUDE.md and AGENTS.md files that apply at scope and at the hits' folders, ones you can read only.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| how | No | ||
| seat | No | the seat token identity_write action=take_seat gave you; pass it on every call while you drive that agent, and each call that carries it keeps the seat yours for a whole lease from that call | |
| limit | No | how many hits (at most 20 with scope "public") | |
| query | No | what you want to know (not needed to open a public file with scope "public" and within) | |
| scope | No | "public" searches the public corpus; a folder path (e.g. "specs", or "/public" for your own folder named public) limits the search to it (a document is refused: search one document with within); omit for everything you can read | |
| cursor | No | scope "public" with export only: a page's `next`, for the page after it | |
| export | No | scope "public" only: "skills" lists the whole public skills collection a page at a time, in `export`, instead of searching | |
| follow | No | ||
| offset | No | scope "public" with within only: where in the file to start, in bytes as read action=document takes it (a part gives nextOffset) | |
| source | No | a sync source id, or a location inside the mirror | |
| thread | No | a message id in the thread | |
| within | No | a document path or node id; with scope "public", one public file as owner/repo/path, its agentlefs://public/ URI, a hit's citation or its GitHub link at a commit (either also says whether the repository has moved on since), or its link (not one from another console served under a path prefix). A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. | |
| acting_as | No | an agent identity below you, or one working in a folder you can write (pass its seat too), by its id (from identity_write action=spawn) or its @handle (brief_me lists your agents with both), to make this one call as, with that agent's narrower access; for a helper whose session signs in as its person | |
| max_bytes | No | scope "public" with within only: the largest part to return, in bytes (default and ceiling 50,000); a part never splits a character, so one smaller than the character at offset holds that character | |
| export_rows | No | scope "public" with export only: the most rows in a page (default and ceiling 5,000) | |
| licensed_only | No | scope "public" only: just the files whose licence lets their text be served (default false: every match, unlicensed ones described with a link) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| hits | Yes | ||
| mode | Yes | ||
| query | Yes | ||
| export | No | ||
| memory | No | the memory files (CLAUDE.md, AGENTS.md) of scope and of the hits' folders and above, only ones you can read | |
| public | No | ||
| skills | No | the skills that apply at scope and at the folders of the hits (a .claude/skills/<name>/SKILL.md or .agents/skills/<name>/SKILL.md there or above), only ones you can read | |
| degraded | Yes | ||
| truncated | Yes | ||
| foldersTotal | No | ||
| licensedOnly | No | ||
| spansPending | No | ||
| foldersSearched | No |