Search nodes and documents
searchFind nodes or documents by the words they contain. Nothing here matches by meaning, so use recall for a natural-language question. method "keyword" (default): ranked full-text search over active nodes; terms are AND-combined, and a multi-word query that matches nothing is retried once as an OR of its words. It returns cards, not bodies (default limit 5). method "exact": the matching line per node for a literal substring, or a POSIX regex with regex:true, across every status including done and archived (default limit 50). scope "documents": a line search of document bodies, a literal substring or, with regex:true, a JavaScript regex; it ignores method and type, and limit caps the number of documents unless max_docs is set. Every hit carries id, title, and url; limit is at most 50, with no paging. Read a full body with fetch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Limit node results to one type. | |
| limit | No | Max results. | |
| query | Yes | What to search for. | |
| regex | No | For method "exact": treat query as a POSIX regex. For scope "documents": treat query as a JavaScript regex. | |
| scope | No | "nodes" (default) or "documents". | |
| method | No | "keyword" (default, ranked relevance) or "exact" (literal term/pattern). | |
| max_docs | No | For scope "documents" only. Max docs in the response. Default 10. | |
| component_id | No | For scope "documents" only. Optional parent-component filter. Pass a COMP-N to scope the search to docs under that component. | |
| project_slug | Yes | Project slug, e.g. "acme-app" — list(what="projects") returns yours. | |
| context_lines | No | For scope "documents" only. Lines of surrounding context returned before and after each match. Default 1. | |
| case_sensitive | No | For scope "documents" only. Default false (case-insensitive). | |
| max_matches_per_doc | No | For scope "documents" only. Max matches surfaced per doc. Default 5. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Ranked search results with ChatGPT-compatible citation fields. | |
| action | Yes | The action that produced this result. |