Capability catalogue
evidenceread
db.object.definition
Get object definition
Returns the T-SQL text of a procedure, view or function (OBJECT_DEFINITION), capped at 200 KB, subject to the connection's object_allowlist. Never table data. Internal evidence: for understanding only, never quoted.
Effect
read Fanout
no
Cache TTL
none
Traits
internal_evidence, read_only
Request arguments
Passed as the args parameter to ctx.capability.call("db.object.definition", …).
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | yes | schema.name or name (dbo is preferred when the schema is not given) |
Response
Returned by ctx.capability.call("db.object.definition", …).
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | yes | |
| type | string | null | yes | |
| schema | string | yes | |
| modified | string | no | |
| truncated | boolean | yes | True when the text was cut at 200 KB |
| definition | string | null | yes | Module text (T-SQL). Null for tables, encrypted modules, or without VIEW DEFINITION |
Example call
From inside your agent's handle(). The kernel resolves db.object.definition to the tenant's connector binding at invocation time.
response = await ctx.capability.call(
"db.object.definition",
args={
"name": "...",
},
)See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.