MCPcopy Create free account
hub / github.com/QodeXcli/QodeX /

Class

src/tools/database/db-tools.ts:212–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210const READ_ONLY_PREFIXES = /^\s*(SELECT|EXPLAIN|SHOW|DESCRIBE|DESC|PRAGMA|WITH)\b/i;
211
212export class DbQueryTool extends Tool<z.infer<typeof DbQueryArgs>> {
213 name = 'db_query';
214 description = 'Run a SQL query against the database. By default ONLY SELECT/EXPLAIN/SHOW/DESCRIBE/PRAGMA are allowed (safe). Pass allow_write=true for mutating statements — these are DESTRUCTIVE and cannot be /restored by QodeX (remote DB state). Use prepared-statement params to avoid injection.';
215 isReadOnly = false; // can be destructive with allow_write

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected