Oracle Component in ToolMode
What Is Tool Mode?
Tool Mode is an operating mode that lets Oracle components work with an AI agent. When Tool Mode is enabled, the component does not run automatically as part of a fixed sequence — instead, it waits on standby until the agent decides it’s needed and triggers it.
Key Benefits
a. On-demand execution – Database operations run only when required, reducing unnecessary load
b. Context-aware decisions – The agent decides when a tool is needed based on user intent
c. Workflow flexibility – The same tool can be reused across different workflows
d. Reusability of data – Schema and query results can be stored and reused without repeated calls
e. Separation of responsibilities – The agent handles reasoning; the tool handles database interaction
Slug
A slug is a unique identifier assigned to a tool so the AI agent can reference and trigger it correctly.
i. Helps the agent identify which tool to call
ii. Prevents confusion when multiple tools exist
iii. Keeps workflows organized and readable
iv. Ensure consistent tool invocation
Tool Mode Workflows
a. Oracle Schema to DataTable
When Tool Mode is enabled and the component is connected to the agent via its slug, the agent retrieves schema metadata (tables, columns, data types, constraints) from the Oracle database upon receiving a user query.
The retrieved schema is structured and stored as Data/DataFrame for reuse — used for SQL generation, validation, and related processing tasks.
Available Tool Operations
| Operation | Description |
|---|---|
| schema_create | Retrieves and structures the Oracle schema into a standardized format for system-wide usage. |
| schema_dataframe | Converts the structured schema into a DataFrame format for analytical processing. |
b. Oracle Query Runner
When Tool Mode is enabled, the agent translates the user’s natural-language input into a SQL query and executes it on the Oracle database via the tool. The results are then processed and returned to the user.
Available Tool Operations
| Operation | Description |
|---|---|
| query | Executes SQL statements on the Oracle database and returns the result set. |
| view | Formats query results for structured, user-friendly presentation. |
Both operations support standardized output formats — Data, DataFrame, JSON, and Message. query is execution-focused; view is presentation-focused.
Example: Tool Mode in Action
1. Scenario: User asks: “Show me employees in the HR department”
2. SQL Generation: Agent generates: SELECT * FROM employees WHERE department = ‘HR’;
3. Execution: Oracle Query Runner executes the generated SQL query on the database
4. Final Output: The system returns HR employee records in a structured format – table, JSON, or DataFrame
Practical Use Cases
a. SQL Query Generation – Fetch schema first, then generate accurate SQL based on real table structure.
b. Schema Validation – Confirm required tables and columns exist before executing workflows.
c. Data Mapping – Map user field names to actual database columns using live metadata.
d. Conversational Data Access – Users ask questions to the agent; the agent retrieves and returns results.
e. Dynamic Reporting – Generate and execute runtime queries based on user input.