Skip to content

inspect_sql

MCP tools › Databases

Inspect SQL against the connection's schema: unknown tables and columns, UPDATE/DELETE without WHERE, MySQL column-level REFERENCES that create no foreign key (needs the read-schema permission).

Its results carry text from files, database: the client is told to treat that as data, never as instructions.

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

Arguments

ArgumentTypeDescription
connectionrequiredstringConnection name from list_connections.
sqlrequiredstringSQL script to inspect.

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 inspect_sql '{"connection":"<string>","sql":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"connection",
"sql"
],
"properties": {
"connection": {
"description": "Connection name from `list_connections`.",
"type": "string"
},
"sql": {
"description": "SQL script to inspect.",
"type": "string"
}
}
}