Capability catalogue
evidenceread
db.proc.stats
Get procedure statistics
Execution statistics of a stored procedure from the plan cache (sys.dm_exec_procedure_stats), summed over its cached plans. Every field is null when the procedure is not in the plan cache (not run since the last restart or cache flush): that means no statistics, not zero executions. 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.proc.stats", …).
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | yes | schema.name or name of a stored procedure |
Response
Returned by ctx.capability.call("db.proc.stats", …).
| Field | Type | Required | Description |
|---|---|---|---|
| cachedTime | string | null | yes | |
| avgElapsedMs | number | null | yes | |
| maxElapsedMs | number | null | yes | |
| lastElapsedMs | number | null | yes | |
| executionCount | integer | null | yes | |
| lastExecutionTime | string | null | yes |
Example call
From inside your agent's handle(). The kernel resolves db.proc.stats to the tenant's connector binding at invocation time.
response = await ctx.capability.call(
"db.proc.stats",
args={
"name": "...",
},
)See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.