sql-format-mcp

v1.0.1
io.github.mrfentmen/sql-format-mcp Checked 2 hours ago Published 1 month ago

Format, minify and split SQL offline, respecting strings, quotes and comments

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

format_sql

Lay out a SQL statement with clauses on their own lines, SELECT lists one item per line and subqueries indented.

ParameterTypeDescription
sql *stringSQL text
indentintegerSpaces per indent level, 2 or 4, default 2
uppercaseKeywordsbooleanUpper-case keywords, default true

minify_sql

Collapse a SQL statement onto one line without touching strings or comments.

ParameterTypeDescription
sql *stringSQL text
stripCommentsbooleanDrop comments as well, default false

split_statements

Split a SQL script into statements on top-level semicolons, keeping strings and comments intact.

ParameterTypeDescription
sql *stringSQL script that may hold several statements