Repository navigation
MCP: goforge_modernize_query converts a whole script - #12
Merged
Merged
Conversation
The tool takes script as well as query. The file is split into statements (;, a lone /, GO, DELIMITER), every query is converted with the same rules, and each statement gets one status (converted, unchanged, review, failed, out-of-scope) with the facts behind it; procedures, packages, schema statements and client commands are listed as out-of-scope, never converted. It can list the statements that need attention, all of them or none, cap the list, and return the converted file and the Markdown migration report. Statements are checked with a PostgreSQL grammar only, and the answer says so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The MCP tool
goforge_modernize_querytakesscript(a whole legacy SQL file) as well asquery(one statement); exactly one of the two is required. For a script it runs the same batch path as the Modernizer's script view: the file is split into statements (;, a lone/,GO,DELIMITER), every query is converted with the same rules, and each statement gets one status (converted, unchanged, review, failed, out-of-scope) with the facts behind it. Procedures, packages, schema statements and client commands are listed as out-of-scope, never converted.Options:
statements(attentionby default,allornone),maxStatements(default 100, the summary always covers the whole file),includeConvertedScript(the converted file; what did not convert stays as comments) andincludeReport(the Markdown migration report). A script over 5 MB is refused. Statements are checked with a PostgreSQL grammar only, and the answer says so: nothing here proves the converted SQL returns the same rows.How it was checked
src/mcp/mcp.test.ts: a seven-statement Oracle script (one converted, one unchanged, one needing review, one failed, three out of scope; the default list,all,maxStatements,none, the converted script and the report) and the argument checks (neither or both ofqueryandscript, a script over 5 MB). The repo's MCP tests pass (10) and the type-check is clean.Reviewer notes