oracle_preview_sql

MCP tool from Oraclemcp by MuhDur

Classify SQL and report whether it is read-only, needs profile-permitted step-up, or exceeds the active profile ceiling, without executing it

How to use it

Project documentation lists oracle_preview_sql for the Oraclemcp MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), then check which tools your installed version makes available. Tool availability can depend on configuration and credentials. A server handshake does not verify this tool’s behavior. See the full listing for setup details.

Install Oraclemcp

$oraclemcp serve --profile db_ro --allow-no-auth
FULL ORACLEMCP LISTING

Other tools in Oraclemcp (39)

compile_object

oraclecompileobject

compile_with_warnings

oraclecompileobject with warnings=true

create_or_replace

oraclecreateorreplace

current_database

oracleconnectioninfo

deploy_ddl

Compatibility wrapper for one DDL statement; preview by default, execution reuses the same DDL profile gate and confirmation

disable_writes

oraclesetsessionlevel with action=drop; immediately returns the session to READONLY

enable_writes

oraclesetsessionlevel with level=READWRITE; preview is still the default

execute_approved

Compatibility wrapper around oracleexecute; token-only calls work for five minutes after previewsql/oraclepreviewsql in the same server process, DML rolls back when commit is omitted, and durable commit requires explicit commit=true; non-transactional effects still consume confirmation even when rol

list_objects

oracleschemainspect

oracle_capabilities

Zero-arg discovery: tools, operating level, feature tiers

oracle_compile_errors

Compile errors for the current schema, an owner, or one PL/SQL object

oracle_compile_object

Preview or compile one PL/SQL/view object through the DDL profile gate; execution requires the single-use confirmation grant returned by preview

oracle_connection_info

Describe the active profile and redacted connection posture; if live metadata is unavailable, returns connected=false with a structured connectionerror and nextactions

oracle_create_or_replace

Preview or apply one CREATE OR REPLACE statement through the classifier and DDL profile gate

oracle_describe

Column and constraint metadata for a table or view

oracle_describe_index

Index metadata, indexed columns, and function-based expressions

oracle_describe_trigger

Trigger timing, target table, status, and body

oracle_describe_view

View definition metadata and columns

oracle_execute

Execute one non-read statement through the active profile/session gate; DML rolls back by default, while commits, DDL/Admin, and non-transactional effects such as sequence NEXTVAL require the execution grant from oraclepreviewsql; query-shaped NEXTVAL is refused because this path does not fetch rows

oracle_explain_plan

Diagnostic EXPLAIN PLAN for a vetted read-only statement; writes PLANTABLE and requires READWRITE plus allowplantablewrite=true

oracle_get_ddl

DBMSMETADATA DDL for an object

oracle_get_source

Full source text or an inclusive fromline/toline range for a package, procedure, function, trigger, or type; pair the range with a line returned by oraclesearchsource; omit objecttype to return every visible source variant for the object name

oracle_list_profiles

List configured connection profiles without exposing connect strings, usernames, or credential references

oracle_list_schemas

List schemas that own objects visible to this session

oracle_patch_source

Preview or apply an exact oldtext→newtext patch to one stored PL/SQL source object (package/body/type/view) through the classifier and DDL profile gate; TOCTOU-safe, re-fetching the current source and re-confirming at execute time

oracle_plscope_inspect

Read PL/Scope identifiers/statements for one object and report unused declarations plus dynamic-SQL lines when metadata is populated

oracle_query

Run a read-only SELECT/WITH (paginated, parameter-bound)

oracle_read_clob

Read one capped CLOB/NCLOB/text value by key

oracle_sample_rows

Safely sample the first rows of a table or view

oracle_schema_inspect

List objects in the current schema, one owner, or all accessible schemas

oracle_search_source

Search ALLSOURCE for a needle; optionally use owner="", objecttype, and namelike to widen or narrow scope; matching lines are capped by maxlinechars, and their LINE values can be passed to oraclegetsource's fromline/toline range

oracle_set_session_level

Preview/apply a temporary session operating-level elevation within the profile ceiling, or drop back to READONLY

oracle_switch_profile

Reconnect the server to another configured profile

patch_package

oraclepatchsource for a package spec or body

patch_view

oraclepatchsource for a view

preview_sql

oraclepreviewsql

query

oraclequery

read_patch_preview

Compatibility helper that lists or reads the last in-process source-patch preview created by oraclepatchsource, patchpackage, or patchview

switch_database

oracleswitchprofile (db is accepted as an alias for profile)