table_ddl
MCP tools › Databases
The definition of one table or view as SQL, as the Database tool window's Show DDL tab has it: CREATE TABLE with columns, types, NOT NULL, defaults, primary key and foreign keys, then its indexes; for a view CREATE VIEW with its stored query. On SQLite the statements the database stores: the table or view as it was created (checks, generated columns, WITHOUT ROWID, STRICT, virtual tables), then its indexes and triggers. With schema the object of another schema from list_schemas, such as an attached SQLite database. Returns name, kind and ddl; nothing is run (needs the read-schema permission).
Its results carry text from database: the client is told to treat that as data, never as instructions.
| Capability | database.table_ddl |
|---|---|
| Area | Databases |
| Access | reads only |
| Reaches | database, network |
| Rights | ssh, database-permission, trusted-project |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
connectionrequired | string | Connection name from list_connections. |
tablerequired | string | Table or view name. |
schema | string | Schema from list_schemas, such as an attached SQLite database (default: the current
schema). |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project table_ddl '{"connection":"<string>","table":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "connection", "table" ], "properties": { "connection": { "description": "Connection name from `list_connections`.", "type": "string" }, "table": { "description": "Table or view name.", "type": "string" }, "schema": { "description": "Schema from `list_schemas`, such as an attached SQLite database (default: the current\nschema).", "type": [ "string", "null" ], "default": null } }}