Search canvas code
code_searchSearch canvas TSX. The search spans all pages unless canvasPageId narrows it, follows branch inheritance, and repairs an empty index from canonical Yjs source once. Hits include stable JSX sourcePath locators (50 per page; continue with elementsCursor and the same query), truncatedElementsCount, page identity, contentHash, import relationships and own/parent provenance. Geometry and edit history are not included. Project source code and public repositories are outside this operation's scope; search them with your own tools. Scope: project:read.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target": "<target>",
"query": "<query>"
},
"name": "code_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search text. Matched against source content; not a regular expression. | |
| cursor | No | Continue one matching frame’s element list using its elementsCursor and the same query. For searches matching several frames, continue with read_files per frame. | |
| target | Yes | Where to search. Only `canvas`: frame source on the branch. Search a Bloom project's code with your own tools. | |
| branchId | No | Target branch id. Omit it — Bloom derives the branch from the frames you name, from the token's narrowing, or from your only readable branch, and enumerates the candidates if it genuinely cannot. | |
| canvasPageId | No | Narrow a `canvas` search to one page. Omit it — a canvas search spans every page of the branch's project, which is what you want when you do not yet know where a frame lives. |