Capability catalogue
codereadfanout
code.search
Search code
Find files whose content matches a query. Fans out across bindings.
Effect
read Fanout
yes
Cache TTL
none
Traits
none
Implemented by
GitHub
The tenant picks one of these when they bind this capability at install time. New implementations land as connectors ship — browse the connector catalogue.
Request arguments
Passed as the args parameter to ctx.capability.call("code.search", …).
| Field | Type | Required | Description |
|---|---|---|---|
| repo | string | no | Optional repository; default: the connection's default or allowed repositories |
| limit | integer | no | default: 20 · min: 1 · max: 100 |
| query | string | yes |
Response
Returned by ctx.capability.call("code.search", …).
Array; each element is an object with the following fields.
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | no | |
| path | string | yes | |
| repo | string | yes | |
| snippet | string | null | no |
Example call
From inside your agent's handle(). The kernel resolves code.search to the tenant's connector binding at invocation time.
response = await ctx.capability.call(
"code.search",
args={
"repo": "...",
"limit": 20,
"query": "...",
},
)See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.