Skip to content

split_sql_statements

MCP tools › Databases

Split an SQL script into statements with byte ranges, using the lexical rules of the dialect.

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

Capabilitydatabase.split_sql_statements
AreaDatabases
Accessreads only
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
sqlrequiredstringSQL script text.
dialectrequiredstring | string | string | string | string | string | stringDialect whose lexical rules apply.

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 split_sql_statements '{"sql":"<string>","dialect":"<value>"}'
Input schema as JSON
{
"properties": {
"sql": {
"description": "SQL script text.",
"type": "string"
},
"dialect": {
"description": "Dialect whose lexical rules apply.",
"$ref": "#/$defs/DialectArg"
}
},
"$defs": {
"DialectArg": {
"description": "SQL dialect accepted by `split_sql_statements`.",
"oneOf": [
{
"description": "PostgreSQL",
"type": "string",
"const": "postgresql"
},
{
"description": "MySQL",
"type": "string",
"const": "mysql"
},
{
"description": "MariaDB",
"type": "string",
"const": "mariadb"
},
{
"description": "Microsoft SQL Server (T-SQL, `GO` batches)",
"type": "string",
"const": "sqlserver"
},
{
"description": "Oracle (PL/SQL blocks end at a `/` line, `q'[…]'` literals)",
"type": "string",
"const": "oracle"
},
{
"description": "SQLite",
"type": "string",
"const": "sqlite"
},
{
"description": "DuckDB (PostgreSQL-like lexis, dollar quotes)",
"type": "string",
"const": "duckdb"
}
]
}
},
"required": [
"sql",
"dialect"
],
"type": "object"
}