lu-query
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Server log level | INFO |
| SENTRY_DSN | No | Sentry DSN; required if Sentry error reporting is enabled | |
| SENTRY_ENV | No | Sentry environment tag on every event | local |
| APP_LOG_LEVEL | No | Server log level (alias of LOG_LEVEL) | INFO |
| MCP_AUDIT_DIR | No | Directory for audit Markdown files; pin to an absolute path or files land in the process working directory | ./mcp-audit-logs |
| ORACLE_DB_URL | Yes | Connect string: JDBC (jdbc:oracle:thin:@//host:1521/service) or easy-connect (host:1521/service) | |
| SENTRY_ENABLED | No | Master switch for error reporting to Sentry; off means nothing is ever sent | false |
| SENTRY_RELEASE | No | Sentry release tag on every event | 0.0.1-SNAPSHOT |
| ORACLE_DB_SCHEMA | No | Schema set via ALTER SESSION SET CURRENT_SCHEMA on each pooled session; without it every tool uses the connected user's schema | |
| ORACLE_POOL_SIZE | No | Connection pool size | 4 |
| MCP_AUDIT_ENABLED | No | Session audit on by default; set to false to turn auditing off | true |
| SENTRY_AUTH_TOKEN | No | Accepted for config parity; unused at runtime | |
| MCP_SERVER_VERSION | No | Version reported by the server (default is the package version) | |
| ORACLE_DB_PASSWORD | Yes | Database password | |
| ORACLE_DB_USERNAME | Yes | Database user | |
| SENTRY_SEND_DEFAULT_PII | No | Let Sentry attach IPs and user agents | false |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
| completions | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| test_connectionA | Verify connectivity to Oracle and report the database version, name, current user, current schema and instance name. WHEN TO CALL: only when the user explicitly asks to verify the connection or diagnose reachability; do NOT call as a preamble before answering a query about tables, data, or schema objects. |
| run_queryA | Run a single SELECT statement and return the result set. Optional offset/limit enable stateless pagination (non-deterministic without an ORDER BY in the SQL). Non-SELECT statements or privilege failures return an Oracle error string. NOTE: recursive constructs like CONNECT BY and WITH (CTE) may be rejected by the SQL parser; for set differences use MINUS, and for row-number/gap problems prefer computing on the returned result set rather than relying on recursive SQL. |
| get_sample_dataA | Return the first N rows of a table as a quick data preview. |
| execute_dmlA | Execute a single INSERT, UPDATE, DELETE or MERGE statement on existing tables and auto-commit it (no explicit COMMIT needed; there is no cross-call transaction boundary). One statement per call. Returns the number of rows affected; if the Oracle user lacks the required privileges the failure surfaces as an error result (isError=true). |
| execute_dml_previewA | Dry-run an UPDATE or DELETE without executing it. Returns the total number of rows that would be affected plus a sample of those rows. INSERT and MERGE are not supported; use execute_dml_rollback_first for those. |
| execute_dml_rollback_firstA | Execute an INSERT, UPDATE, DELETE or MERGE inside a transaction that is immediately rolled back. Nothing is persisted; the tool only proves the statement is valid and reports the number of rows affected. Call execute_dml afterwards to apply the change for real. |
| comment_on_tableA | Add or replace the comment on a table. Only works for tables the MCP user owns (no system privilege exists for COMMENT on others' objects; you'll get ORA-01031 otherwise). |
| comment_on_columnA | Add or replace the comment on a column. Only works for tables the MCP user owns. |
| create_or_replace_viewA | Create or replace a view in the MCP user's own schema. Requires CREATE VIEW privilege; Oracle returns ORA-01031 otherwise. |
| create_synonymA | Create a private or public synonym pointing at another schema's object. Requires CREATE SYNONYM (private) or CREATE PUBLIC SYNONYM (public); Oracle returns ORA-01031 otherwise. |
| create_sequenceA | Create a sequence in the MCP user's own schema. Requires CREATE SEQUENCE privilege; Oracle returns ORA-01031 otherwise. |
| create_indexA | Create an index on a table. Requires CREATE ANY INDEX (if the table is in another schema) or table ownership; Oracle returns ORA-01031 otherwise. |
| create_mview_logA | Create a materialized-view log on a table for fast refresh. Requires CREATE TABLE privilege and tablespace quota; Oracle returns ORA-01031 / ORA-01950 otherwise. |
| list_schemasB | List all Oracle schemas (users) visible to the current connection. |
| list_tablesB | List tables. Supports an optional schema and a case-insensitive LIKE name pattern (use '%' and '_' wildcards; defaults to '%'). |
| list_viewsA | List views. Optional schema and case-insensitive LIKE name pattern (defaults to '%'). |
| describe_tableA | Describe the columns of a table: name, data type, nullability, default value and comment. ALWAYS call this before writing a SELECT/INSERT/UPDATE against an unverified table, so column names and types are known rather than invented. |
| table_existsA | Return true if a table exists (checked via ALL_TABLES; views are NOT considered). Use this instead of run_query {SELECT 1 FROM ALL_TABLES WHERE ...}. |
| search_objectsB | Search database objects by a case-insensitive LIKE name pattern, optionally filtered by object type. |
| list_objectsC | List database objects (tables, views, packages, procedures, functions, ...). Optional schema and object type filter. |
| get_ddlA | Return the DDL definition of an object as a CLOB string, using DBMS_METADATA.GET_DDL. Read-only: never executes the DDL. All three parameters (schema, name, type) are REQUIRED. Valid type values: TABLE, VIEW, INDEX, SEQUENCE, PROCEDURE, FUNCTION, PACKAGE, PACKAGE BODY, TRIGGER, TYPE, SYNONYM, DB LINK. schema/name/type are matched case-insensitively against ALL_OBJECTS (lowercase is fine) and the exact stored object is passed to GET_DDL, so a case mismatch never surfaces as ORA-31603. Requires SELECT_CATALOG_ROLE plus EXECUTE on SYS.DBMS_METADATA (granted in db/setup_least_privilege_user.sql); privilege or not-found failures surface as error results. |
| list_indexesA | List indexes on a table with their columns, uniqueness and status. |
| list_constraintsA | List constraints on a table (primary key, foreign key, unique, check) with their columns and references. |
| list_sequencesA | List sequences with their range, increment, last number, cycle flag and cache size (queried from ALL_SEQUENCES, not DBA_SEQUENCES). cache_size > 0 means values are pre-allocated, so gaps can appear after a crash or rollback. For a single sequence's full metadata (including order_flag) use get_sequence_info. Optional schema filter. |
| get_sequence_infoA | Return metadata for a single sequence (min_value, max_value, increment_by, last_number, cache_size, cycle_flag, order_flag) from ALL_SEQUENCES. Read-only: does NOT consume NEXTVAL, so the sequence counter is untouched. Prefer this over querying ALL_SEQUENCES/DBA_SEQUENCES directly. |
| list_triggersA | List triggers with their type, triggering event, target table and status. Optional schema. |
| list_proceduresC | List stored procedures, functions, packages and types. Optional schema, LIKE name pattern and object type filter. |
| list_synonymsB | List private and public synonyms with their resolved target owner/name and optional DB link. Optional schema and LIKE name pattern. |
| list_db_linksA | List database links visible to the current user with their connect username, host and creation date. |
| list_directoriesB | List Oracle directory objects and their filesystem paths. |
| list_external_tablesB | List external tables with their access driver, default directory, reject limit and access parameters. |
| list_materialized_viewsB | List materialized views with their refresh mode, method, last refresh and staleness. Optional schema and LIKE name pattern. |
| list_mview_logsC | List materialized view logs defined on tables. Optional schema. |
| list_partitionsB | List partitions of a partitioned table: name, position, high value, row count, compression, last analyzed. |
| list_ind_partitionsB | List partitions of indexes on a table: index name, partition, status, leaf blocks, distinct keys, num rows. |
| list_subpartitionsB | List subpartitions of a composite-partitioned table. Requires schema and table. |
| list_lob_columnsB | List LOB columns of a table with their segment, index, caching, logging, SECUREFILE flag and retention. |
| list_typesA | List user-defined Oracle types with their typecode, attribute count, methods and supertype. |
| list_invalid_objectsA | List objects whose status is INVALID (broken code needing recompile). Excludes index/LOB partitions. Optional schema and type filter. |
| list_dependenciesA | List objects that a given object depends on (referenced objects). Useful for impact analysis. |
| list_scheduler_jobsA | List DBMS_SCHEDULER jobs with state, run/failure counts, last start, next run and repeat interval. |
| list_scheduler_job_runsA | List recent DBMS_SCHEDULER job run details: start time, run duration, instance id, session id, error code, additional info. Ordered by start time desc. (operation/status live in ALL_SCHEDULER_JOB_LOG, not the run-details view.) |
| get_table_statsA | Return optimizer statistics for a table: row count, blocks, avg row length, sample size, last analyzed, degree, partitioned, compression. |
| get_column_statsB | Return optimizer statistics for columns of a table: number of distinct values (NDV), density, null count, bucket count, low/high value, histogram type. Optional column filter. |
| get_histogramA | Return the optimizer histogram endpoints for a column (frequency or height-balanced). Useful to understand data skew and cardinality estimates. |
| get_session_privsA | List system privileges available to the current connection: directly granted system privs plus effective privs from enabled roles (deduplicated, ordered). WHEN TO CALL: only when the user explicitly asks what privileges the connection has; do NOT call as a preamble before querying tables or objects. |
| get_session_rolesA | List roles enabled for the current connection, with admin option and default-role flag. WHEN TO CALL: only when the user explicitly asks which roles the connection has; do NOT call as a preamble before querying tables or objects. |
| get_plsql_errorsA | List compilation errors of PL/SQL units (procedures, functions, packages, triggers, types). Optional schema, name and type filter. Critical for diagnosing broken code. |
| oracle_mcp_health_reportA | One-shot readiness check: connectivity, database version, catalog-role, invalid objects, and server configuration (max-rows, query-timeout, audit). Returns an aggregated health report for quick self-diagnosis. WHEN TO CALL: only when the user explicitly asks for a health/readiness check; do NOT call as a preamble before other work. |
| describe_plsqlB | Describe a PL/SQL object: returns its arguments (name, data type, in/out, position) and full source code. Read-only. |
| call_procedureA | Execute a PL/SQL procedure, function or package subprogram with typed arguments. Supports IN/OUT/INOUT scalar parameters and function return values via typed binds (SYS_REFCURSOR OUT/return arguments are fetched and returned as row arrays). Pass args as a JSON array: [{"name":"P","direction":"IN","dataType":"NUMBER","value":1}]. PL/SQL BOOLEAN/RECORD/TABLE/VARRAY/OBJECT types are rejected with guidance to create a scalar wrapper. Requires GRANT EXECUTE on the target object. Auto-commits like execute_dml. |
| explain_planA | Generate and return the Oracle execution plan for a SQL statement via EXPLAIN PLAN and DBMS_XPLAN, without executing the statement. Needs a PLAN_TABLE; if it is missing or the user lacks access, the failure is surfaced as an error result. Reports progress to clients that pass a progress token. |
| suggest_indexA | Analyse a SQL statement via EXPLAIN PLAN and, when a table is read by full scan, propose a CREATE INDEX statement. Returns the recommended DDL as text; it is never executed. Apply it manually only after DBA review. |
| list_unused_indexesA | List indexes with their columns and best-effort usage information. The likely_unused flag is YES/NO when index monitoring is enabled, otherwise UNKNOWN. Definitive 'unused' answers require a DBA to run ALTER INDEX ... MONITORING USAGE. |
| run_sql_tuning_advisorA | Run Oracle's SQL Tuning Advisor (DBMS_SQLTUNE) on a statement and return its TEXT report with recommendations (indexes, SQL profiles, statistics, rewrites). Requires the ADVISOR privilege; a missing privilege is surfaced as an error result. Reports progress to clients that pass a progress token. |
| find_free_idA | Find a free id for a new row: scans 1..maxRange (default 1000, capped at 10000) and returns the lowest value not already used, so a key can be inserted without a sequence. |
| find_duplicatesA | Find duplicate value groups in one or more columns of a table (excluding NULLs). Groups at or above minCount (default 2) come back with a COUNT and a sample ROWID. |
| count_rowsA | Count rows in a table without running SQL. Useful to size a table before indexing, partitioning or sampling. |
| get_next_sequence_valueA | Return the NEXTVAL of a sequence. WARNING: this is a side-effecting read — calling it advances the sequence counter and the consumed value cannot be reused. When the sequence has cache > 0 the returned value may already be consumed elsewhere; before using it as a key, verify it is not already present in the target table. Use sparingly. |
| validate_fk_integrityA | Check one or all foreign keys of a table and report orphan rows (child rows whose parent is missing). Returns one entry per FK with constraint name, child/parent columns and the orphan count; an empty list means referential integrity is intact. |
| get_dependency_graphB | Build an object-dependency graph for a schema using all_dependencies. Returns directed edges (dependent→referenced) filtered by optional name/type, plus a Mermaid diagram string. |
| get_fk_graphA | Build a foreign-key relationship graph for a schema or a single table. Returns directed edges (child→parent) and a Mermaid diagram string. |
| list_active_sessionsA | List currently ACTIVE sessions with username, machine, program, last call elapsed, module and logon time. Optional username and sid filters. |
| list_blocked_sessionsA | List sessions currently blocked by another session, with the blocker sid/username/program and the wait event being waited on. |
| list_locksA | List DML/transaction/user locks held and requested, with the locked object name and lock mode (decoded). |
| get_session_sql_textC | Return the full SQL text currently being executed by a session, given its sid and serial#. |
| list_top_sqlB | Top-N SQL statements ordered by buffer_gets (default), disk_reads, elapsed_time, executions or cpu_time. Returns sql_id, executions, gets/reads/elapsed and a 200-char SQL preview. |
| get_wait_eventsB | List current wait events from V$SESSION_WAIT. Optional sid filter and wait_class filter (e.g. 'Application','Concurrency','User I/O'). |
| get_session_longopsA | List long-running operations from V$SESSION_LONGOPS (backups, stats gathering, long queries) with progress percentage and ETA. Optional sid filter; only in-progress ops shown. |
| get_instance_infoA | Return Oracle instance information: name, host, version, startup time, status, archiver, thread. |
| get_database_infoA | Return database-level information: name, creation date, log mode (archivelog/noarchivelog), open mode, role, flashback status. |
| get_system_statsA | Return cumulative system statistics from V$SYSSTAT (parse count, execute count, DB time, physical reads/writes, etc.). |
| get_db_time_modelA | Return the database time model from V$SYS_TIME_MODEL: DB CPU, DB time, parse time elapsed, hard parse elapsed, etc. |
| get_parameterA | Return Oracle initialization parameters from V$PARAMETER with type, value, default/modified flags and modifiability. Optional name LIKE pattern (case-insensitive, supports %). |
| list_datafile_ioB | List datafiles with size, physical reads/writes, block reads/writes and average IO time per file. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| review-sql-performance | Build a read-only, evidence-based Oracle SQL performance review. SQL Tuning Advisor remains off unless licensed use is explicitly selected. |
| explain-schema | Explore an Oracle schema or table with bounded metadata calls and statistics-first sizing. |
| debug-invalid-plsql | Diagnose invalid PL/SQL with focused source/error analysis and no compilation attempt. |
| safe-dml-plan | Prepare a non-committing DML impact and recovery plan. Permanent execution always requires a separate user confirmation. |
| data-quality-audit | Profile table quality with a bounded quick mode or an explicitly selected full scan mode. |
| triage-database-incident | Run a bounded, read-only Oracle incident triage for blocking, waits, slow SQL, long operations, or I/O pressure. |
| prepare-plsql-call | Resolve and review a call_procedure payload without automatically executing side-effecting PL/SQL. |
| operating-rules | Reference-only summary of Oracle MCP scope, calling discipline, and safety boundaries. |
| oracle-sql-style | Return canonical Oracle SQL authoring rules for identifiers, aliases, literals, pagination, and dialect pitfalls. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 75 tools
75 tools create many overlapping listing and diagnostic tools (e.g., list_objects vs list_tables vs search_objects; get_table_stats vs get_column_stats). Descriptions help distinguish most, but the sheer volume and multiple entry points for similar tasks make misselection likely.
Nearly all tools use snake_case with a verb_noun pattern (list_*, get_*, create_*). Minor deviations like table_exists and oracle_mcp_health_report break the pattern slightly.
75 tools is far beyond the 3-15 range for a well-scoped server. While the domain is complex, this many tools creates cognitive overload and violates the rubric's extreme mismatch threshold (50+).
Extensive read/metadata coverage and some create/DML, but missing core DDL operations like create/drop/alter table, grant/revoke, and transaction control. Agents will hit dead ends for many administrative tasks.