Semantic code search
semantic_searchFind code by meaning in an indexed project. Ask one natural-language sentence, not keywords, to get ranked file:line references.
Instructions
Find code by meaning in an indexed project. Ask one full natural-language sentence, not keywords. Good: "How does the app validate share token permissions?" Bad: "shareToken auth validate". Returns file:line references by default - read the files you need. Searches .ts and .tsx unless include adds other indexed extensions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute project root - omit to use the working directory | |
| limit | No | Max results | |
| query | Yes | One natural-language sentence | |
| include | No | Extra indexed extensions to search, e.g. [".md", ".css"] | |
| threshold | No | Min similarity - raise to 0.5 for precision, lower for recall | |
| returnFullContent | No | Return chunk code instead of file:line references - keep limit under 20 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | Sync, index and limit notes | |
| status | Yes | "not_indexed": run index_project for this path first | |
| hasMore | Yes | More matches pass the threshold | |
| results | Yes |