get_object_definition
Retrieve database-generated SQL definitions for non-table objects—views, functions, triggers, sequences, or indexes—by name, including schema-qualified and overloaded matches.
Instructions
Get the faithful SQL definition of a non-table object by name.
Covers views (and materialized views), functions/procedures, triggers,
sequences, and indexes — produced by the database's own pg_get_*def functions.
name may be schema-qualified ("public.my_view"); all matches are returned
(same name in several schemas, overloaded functions).
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": {
"database": "<database>",
"object_type": "<object_type>",
"name": "<name>"
},
"name": "get_object_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| database | Yes | ||
| object_type | Yes |