Skip to content

generate_ddl

MCP tools › Databases

Generate the CREATE script (tables, primary keys, indexes, foreign keys) of a connection's schema or of selected tables; 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.

Capabilitydatabase.generate_ddl
AreaDatabases
Accessreads only
Reachesdatabase, network
Rightsssh, database-permission, trusted-project
Dry runnone

Arguments

ArgumentTypeDescription
connectionrequiredstringConnection name from list_connections.
tablesarray of stringTables to include (default: all tables).

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.

Terminal window
ferris-idea call ~/my-project generate_ddl '{"connection":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"connection"
],
"properties": {
"connection": {
"description": "Connection name from `list_connections`.",
"type": "string"
},
"tables": {
"description": "Tables to include (default: all tables).",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
}
}