Skip to content
Konstera
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", …).

FieldTypeRequiredDescription
namestringyesschema.name or name (dbo is preferred when the schema is not given)

Response

Returned by ctx.capability.call("db.object.definition", …).

FieldTypeRequiredDescription
namestringyes
typestring | nullyes
schemastringyes
modifiedstringno
truncatedbooleanyesTrue when the text was cut at 200 KB
definitionstring | nullyesModule 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.