Describe a database object
pg_describe_objectInspect PostgreSQL non-table objects—functions, sequences, types, indexes, triggers, extensions, and schemas—to view definitions, signatures, settings, and dependencies without catalog queries.
Instructions
Describe one object that is not a table: a function, procedure, aggregate, sequence, type, index, trigger, extension or schema.
Functions show every overload with arguments, return type, language, volatility, security definer, parallel safety, cost, settings, comment and source code. Sequences show type, range, last value, percent used and owning column. Types show enum labels, domain base type and checks, composite attributes or range subtype. Extensions show their version and the objects they created.
name is name or schema.name; a trigger can be table.trigger, and a function
accepts a signature such as shop.order_total(bigint). max_source_chars cuts long
function bodies. For tables and views use pg_describe_table.
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": {
"name": "<name>",
"kind": "<kind>"
},
"name": "pg_describe_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| name | Yes | ||
| connection | No | ||
| max_source_chars | No |