pg_manage_functions
Manage PostgreSQL database functions by listing existing functions, creating new ones with custom parameters and return types, or removing functions when needed.
Instructions
Manage PostgreSQL functions - get, create, or drop functions with a single tool. Examples: operation="get" to list functions, operation="create" with functionName="test_func", parameters="" (empty for no params), returnType="TEXT", functionBody="SELECT 'Hello'"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectionString | No | PostgreSQL connection string (optional) | |
| operation | Yes | Operation to perform: get (list/info), create (new function), or drop (remove function) | |
| functionName | No | Name of the function (required for create/drop, optional for get to filter) | |
| schema | No | Schema name (defaults to public) | |
| parameters | No | Function parameters - required for create operation, required for drop when function is overloaded. Use empty string "" for functions with no parameters | |
| returnType | No | Return type of the function (required for create operation) | |
| functionBody | No | Function body code (required for create operation) | |
| language | No | Function language (defaults to plpgsql for create) | |
| volatility | No | Function volatility (defaults to VOLATILE for create) | |
| security | No | Function security context (defaults to INVOKER for create) | |
| replace | No | Whether to replace the function if it exists (for create operation) | |
| ifExists | No | Whether to include IF EXISTS clause (for drop operation) | |
| cascade | No | Whether to include CASCADE clause (for drop operation) |