-
Notifications
You must be signed in to change notification settings - Fork 55
Add read-only mode and query execution capabilities #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
danielmeppiel
merged 26 commits into
danielmeppiel:main
from
kevingatera:feat/implement-query-execution-capabilities
Aug 22, 2025
Merged
Changes from 15 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
41dcb7d
Add run_sql_query tool for executing read-only SQL queries
kevingatera bf3b5f7
Add wrap_untrusted function to handle untrusted data and reduce promp…
kevingatera aafca5a
Add read-only mode support to improve security and prevent accidental…
kevingatera 1b2f571
Externalize formatter as per Daniel's comment
kevingatera 2187fd3
Improved SQL result formatter now pads each column to the widest head…
kevingatera ac757c5
Fixed the error handling in run_sql_query to properly catch exception…
kevingatera 78412fb
Created a unified _assert_query_executable method that checks both qu…
kevingatera 6cb2557
Provide clear documentation about the tool's capabilities in both rea…
kevingatera eecc32d
Update main.py
danielmeppiel 08c896c
Update db_context/schema/formatter.py
kevingatera 0eec9a2
Commit only on explicit write ops
kevingatera 7a1fae4
Provide a bit more robust SQL injection
kevingatera 4184091
Centralize cursor management in execute_sql_query
kevingatera c07eb0f
Use try catch for exceptions coming from Database API
kevingatera da22779
Restore to single-query column search with result cache
kevingatera ba09a78
Add sqlparse dependency and update package metadata
kevingatera 7ee8b5c
Implemented sqlparse instead of regex-based validation
kevingatera 848200f
Fix wrap_untrusted with XML escaping and clearer boundaries
kevingatera 63c9833
Add defensive read-only check and fix token validation
kevingatera 3b71142
CI: add GitHub Actions workflow for unit & integration tests with Ora…
danielmeppiel bc6ef40
refactor: move wrap_untrusted into db_context.utils and fix test imports
danielmeppiel 6e9fb38
merge: incorporate wrap_untrusted refactor into PR branch
danielmeppiel f138a31
ci: run unit tests on push and PR; gate integration tests on unit tests
danielmeppiel f6362e5
docs: tighten MCP tool docstrings with Use/Compose/Avoid guidance
danielmeppiel 5811da4
feat: add query result formatting improvements, explain plan tool, an…
danielmeppiel 9c1aaeb
fix: correct cross-schema foreign key detection in get_related_tables…
danielmeppiel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.