tables
Manage PostgreSQL database tables by listing, creating, altering, dropping tables, and retrieving detailed table information through structured operations.
Instructions
Table management: list, create, alter, drop tables and get detailed table information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action: list (all tables), info (table details), create (new table), drop (remove table), add_column (add column), drop_column (remove column), rename (rename table) | |
| columnName | No | Column name (required for add_column, drop_column) | |
| columns | No | Column definitions for create action | |
| dataType | No | Data type (required for add_column) | |
| newName | No | New name (required for rename action) | |
| options | No | Action-specific options | |
| schemaName | No | Schema name (default: public) | public |
| tableName | No | Table name (required for info, create, drop, add_column, drop_column, rename) |
Input Schema (JSON Schema)
{
"properties": {
"action": {
"description": "Action: list (all tables), info (table details), create (new table), drop (remove table), add_column (add column), drop_column (remove column), rename (rename table)",
"enum": [
"list",
"info",
"create",
"drop",
"add_column",
"drop_column",
"rename"
],
"type": "string"
},
"columnName": {
"description": "Column name (required for add_column, drop_column)",
"type": "string"
},
"columns": {
"description": "Column definitions for create action",
"items": {
"properties": {
"defaultValue": {
"type": "string"
},
"name": {
"type": "string"
},
"nullable": {
"default": true,
"type": "boolean"
},
"primaryKey": {
"default": false,
"type": "boolean"
},
"type": {
"type": "string"
}
},
"required": [
"name",
"type"
],
"type": "object"
},
"type": "array"
},
"dataType": {
"description": "Data type (required for add_column)",
"type": "string"
},
"newName": {
"description": "New name (required for rename action)",
"type": "string"
},
"options": {
"description": "Action-specific options",
"properties": {
"cascade": {
"default": false,
"type": "boolean"
},
"ifExists": {
"default": true,
"type": "boolean"
},
"ifNotExists": {
"default": false,
"type": "boolean"
},
"includeSystemTables": {
"default": false,
"type": "boolean"
},
"includeViews": {
"default": false,
"type": "boolean"
},
"temporary": {
"default": false,
"type": "boolean"
}
},
"type": "object"
},
"schemaName": {
"default": "public",
"description": "Schema name (default: public)",
"type": "string"
},
"tableName": {
"description": "Table name (required for info, create, drop, add_column, drop_column, rename)",
"type": "string"
}
},
"required": [
"action"
],
"type": "object"
}