{"id":"sql-statements-split","version":"1.0.0","description":"Split SQL text into exact statement spans with explicit PostgreSQL, MySQL, or SQLite lexical rules.","supported_operations":["split SQL statements","find SQL statement boundaries","split PostgreSQL script","split MySQL script","split SQLite script","extract exact SQL source spans"],"unsupported_operations":["execute or validate SQL semantics","parse SQL into an abstract syntax tree","expand PostgreSQL psql or SQLite shell commands"],"semantics":["Offsets are zero-based JavaScript UTF-16 indices; each text is exactly input.text.slice(start, end), excluding its delimiter and surrounding whitespace.","Semicolons inside recognized quoted constructs and comments are not separators; comments remain in a statement span.","PostgreSQL recognizes ordinary and E-prefixed strings, identifiers, nested block comments, line comments, and dollar quotes; MySQL recognizes quotes, backticks, # comments, and bounded DELIMITER lines; SQLite recognizes quotes, brackets, backticks, and comments.","Empty and comment-only segments are omitted, and statements remain in source order.","MySQL DELIMITER directives are control lines, are excluded from output, and are accepted only between statements."],"limits":{"max_input_bytes":262144,"max_statements":1000,"max_delimiter_bytes":16,"max_delimiter_directives":32,"max_block_comment_depth":64},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"properties":{"text":{"type":"string"},"dialect":{"type":"string","enum":["postgresql","mysql","sqlite"]}},"required":["text","dialect"]},"output_schema":{"type":"object","additionalProperties":false,"properties":{"dialect":{"type":"string","enum":["postgresql","mysql","sqlite"]},"count":{"type":"integer","minimum":0,"maximum":1000},"statements":{"type":"array","maxItems":1000,"items":{"type":"object","additionalProperties":false,"properties":{"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0},"text":{"type":"string"}},"required":["start","end","text"]}}},"required":["dialect","count","statements"]},"examples":[{"input":{"text":"SELECT ';'; SELECT 2;","dialect":"postgresql"},"output":{"dialect":"postgresql","count":2,"statements":[{"start":0,"end":10,"text":"SELECT ';'"},{"start":12,"end":20,"text":"SELECT 2"}]}},{"input":{"text":"DELIMITER //\nCREATE PROCEDURE p() BEGIN SELECT 1; END//\nDELIMITER ;\nSELECT 2;","dialect":"mysql"},"output":{"dialect":"mysql","count":2,"statements":[{"start":13,"end":53,"text":"CREATE PROCEDURE p() BEGIN SELECT 1; END"},{"start":68,"end":76,"text":"SELECT 2"}]}}],"execute_url":"/v1/tools/sql-statements-split/versions/1.0.0/execute"}