Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TechFernandesLTDA/apex-mcp/llms.txt

Use this file to discover all available pages before exploring further.

High-level generators compose multiple tool calls into a single operation — the fastest way to build Oracle APEX 24.2 applications. A single generator call can introspect your database schema, create multiple pages, wire up navigation, generate LOVs for foreign-key columns, and connect DML processes automatically. Use these tools first; reach for lower-level page and region tools only when you need to customize individual components.

Full Application Generators

apex_generate_crud

Generate a complete Create/Read/Update/Delete module for a database table. This is the most powerful single-table generator. It introspects the table structure, infers item types from column naming conventions and data types, auto-creates LOVs for FK columns, and links the list and form pages together. What it creates:
  • List page with an Interactive Report showing all table rows
  • Edit-link column in the IR pointing to the form page
  • IR worksheet with default sort on primary key
  • “New” button in the IR search bar
  • Form page with items for every non-audit column (types inferred from Oracle metadata)
  • Hidden PK item(s), select lists for FK columns with auto-generated LOVs
  • CANCEL, DELETE (conditional on PK not null), and SAVE buttons
  • NATIVE_FORM_DML process for INSERT / UPDATE / DELETE
  • Post-submit redirect back to the list page
table_name
string
required
Database table name (case-insensitive). Validated against user_tab_columns before any DDL is executed.
list_page_id
integer
required
Page ID for the Interactive Report list page (e.g., 10).
form_page_id
integer
required
Page ID for the edit form page (e.g., 11).
list_page_name
string
Display name for the list page. Defaults to the humanized table name (e.g., "EMPLOYEES""Employees").
form_page_name
string
Display name for the form page. Defaults to "Edit {list_page_name}".
Add a real-time search bar to the IR.
auth_scheme
string
Authorization scheme name to apply to both pages. Leave empty for public pages.
audit_columns
array
Custom list of column names to exclude from the form (e.g., ["CREATED_ON","UPDATED_ON"]). Defaults to a built-in set covering common English and Portuguese audit column patterns.
editable
boolean
default:"true"
When false, form items render as display-only and Save/Delete buttons are omitted.
items_per_page
integer
default:"15"
Rows per page in the IR default report.
button_labels
object
Override default button labels. Supported keys: new, save, cancel, delete, confirm_delete.
Example:
apex_generate_crud(
    table_name="EMPLOYEES",
    list_page_id=10,
    form_page_id=11,
    button_labels={"new": "Add Employee", "delete": "Remove"},
    items_per_page=20,
)

apex_generate_from_schema

Generate a complete application from a list of database tables. This is the highest-level generator — pass your table list and receive a working multi-page app with navigation in a single call. What it creates:
  • A CRUD module (list + form pages) for every table in tables
  • A dashboard page (page 1) with one KPI metric card per table showing its row count
  • Navigation menu entries for all generated list pages and the dashboard
tables
array
required
Ordered list of table names, e.g. ["EMPLOYEES", "DEPARTMENTS", "PROJECTS"]. Pages are allocated in pairs: start_page_id/start_page_id+1, start_page_id+2/start_page_id+3, etc.
start_page_id
integer
default:"10"
First page ID for the first CRUD list page.
include_dashboard
boolean
default:"true"
Generate a dashboard page (page 1) with record-count KPI cards.
nav_icon_map
object
Map of TABLE_NAME → Font Awesome icon class for navigation entries, e.g. {"EMPLOYEES": "fa-users"}. Unmapped tables default to fa-table.
Example:
apex_generate_from_schema(
    tables=["EMPLOYEES", "DEPARTMENTS", "PROJECTS"],
    start_page_id=10,
    include_dashboard=True,
    nav_icon_map={
        "EMPLOYEES": "fa-users",
        "DEPARTMENTS": "fa-building",
        "PROJECTS": "fa-folder",
    },
)

apex_generate_dashboard

Generate a dashboard page with KPI cards and an Interactive Report. What it creates:
  • A KPI cards region using Universal Theme t-Cards grid layout (rendered via NATIVE_PLSQL)
  • An Interactive Report region below the cards
page_id
integer
required
Page ID for the dashboard (typically 1).
page_name
string
default:"Dashboard"
Display name for the dashboard page.
kpi_queries
array
List of KPI card definitions. Each object:
{
  "title": "Total Users",
  "sql": "SELECT COUNT(*) FROM users",
  "icon": "fa-users",
  "color": "u-color-1"
}
If omitted, four sample KPI cards are generated automatically.
ir_sql
string
SQL for the bottom Interactive Report. Defaults to SELECT table_name, num_rows FROM user_tables.
ir_title
string
default:"Recent Records"
Title for the IR region.
Example:
apex_generate_dashboard(
    page_id=1,
    page_name="Operations Dashboard",
    kpi_queries=[
        {"title": "Open Orders",  "sql": "SELECT COUNT(*) FROM ORDERS WHERE STATUS='OPEN'",  "icon": "fa-shopping-cart", "color": "u-color-1"},
        {"title": "Active Users", "sql": "SELECT COUNT(*) FROM USERS WHERE FL_ATIVO='S'",    "icon": "fa-users",         "color": "u-color-2"},
        {"title": "Revenue",      "sql": "SELECT TO_CHAR(SUM(AMOUNT),'FM$999,990') FROM ORDERS", "icon": "fa-dollar",   "color": "u-color-3"},
    ],
    ir_sql="SELECT ORDER_ID, CUSTOMER, AMOUNT, STATUS FROM ORDERS ORDER BY ORDER_DATE DESC",
)

apex_generate_analytics_page

Generate a complete analytics page combining metric cards and JET charts in a single call. What it creates:
  • Creates the page if it does not yet exist in the session
  • A apex_add_metric_cards region at the top (if metrics provided)
  • One apex_add_jet_chart region per entry in charts
page_id
integer
required
Target page ID.
page_name
string
default:"Analytics"
Display name (used only when the page is created fresh).
metrics
array
List of metric card dicts (same format as apex_add_metric_cards). See the Metric Cards reference.
charts
array
List of chart dicts. Each supports the same arguments as apex_add_jet_chart: region_name, chart_type, sql_query, label_column, value_column, series_name, height, y_axis_title, x_axis_title, extra_series.
auth_scheme
string
Optional authorization scheme applied when the page is created.
Example:
apex_generate_analytics_page(
    page_id=5,
    page_name="Sales Analytics",
    metrics=[
        {"label": "Total Orders", "sql": "SELECT COUNT(*) FROM ORDERS", "icon": "fa-shopping-cart", "color": "blue"},
        {"label": "Avg Value",    "sql": "SELECT ROUND(AVG(AMOUNT),2) FROM ORDERS", "icon": "fa-dollar", "color": "green"},
    ],
    charts=[
        {"region_name": "Orders by Status", "chart_type": "pie",
         "sql_query": "SELECT STATUS LABEL, COUNT(*) VALUE FROM ORDERS GROUP BY STATUS"},
        {"region_name": "Monthly Revenue",  "chart_type": "bar",
         "sql_query": "SELECT TO_CHAR(ORDER_DATE,'MM/YYYY') LABEL, SUM(AMOUNT) VALUE FROM ORDERS GROUP BY TO_CHAR(ORDER_DATE,'MM/YYYY') ORDER BY 1"},
    ],
)

Page-Level Generators

apex_generate_login

Generate a standard APEX authentication login page. What it creates:
  • Login page using the APEX login page template (centered, no navigation)
  • P{page_id}_USERNAME text item with autocomplete="username"
  • P{page_id}_PASSWORD password item with autocomplete="current-password"
  • Hot “Sign In” button
  • NATIVE_PLSQL authentication process (defaults to apex_authentication.login())
page_id
integer
default:"101"
Page ID. Must match the login URL configured in apex_create_app().
page_name
string
default:"Login"
Page display name.
app_name
string
Application name displayed above the login form. Defaults to session.app_name.
username_label
string
default:"Username"
Label for the username field.
password_label
string
default:"Password"
Label for the password field.
login_button_label
string
default:"Sign In"
Label on the submit button.
auth_process_plsql
string
Custom PL/SQL block for authentication. If omitted, uses apex_authentication.login(p_username=>:P101_USERNAME, p_password=>:P101_PASSWORD).
Example:
apex_generate_login(
    page_id=101,
    app_name="HR Portal",
    username_label="Employee ID",
    login_button_label="Sign In",
)

apex_generate_report_page

Generate a report page with an Interactive Report plus optional filter items at the top. What it creates:
  • The page (skipped if it already exists)
  • A “Filtros” filter region with the specified filter items and a Search button
  • An Interactive Report region with the supplied SQL
  • IR worksheet with optional CSV/XLSX/PDF export
page_id
integer
required
Target page ID.
page_name
string
required
Display name for the page.
sql_query
string
required
SQL for the Interactive Report. Use bind variables matching filter_items names, e.g. :P5_STATUS.
filter_items
array
List of filter field definitions. Each object:
{
  "name": "STATUS",
  "label": "Status",
  "type": "select",
  "lov": "SELECT DISTINCT DS_STATUS d, DS_STATUS r FROM MY_TABLE ORDER BY 1"
}
Supported type values: text, select, date, number. Item names are auto-prefixed with P{page_id}_.
title
string
Title for the IR region. Defaults to page_name.
auth_scheme
string
Authorization scheme name.
include_export
boolean
default:"true"
Show CSV / XLSX / PDF export buttons in the IR.
Example:
apex_generate_report_page(
    page_id=20,
    page_name="Order Report",
    sql_query="""
        SELECT ORDER_ID, CUSTOMER, AMOUNT, STATUS, ORDER_DATE
          FROM ORDERS
         WHERE (:P20_STATUS IS NULL OR STATUS = :P20_STATUS)
           AND (:P20_FROM   IS NULL OR ORDER_DATE >= TO_DATE(:P20_FROM,'YYYY-MM-DD'))
    """,
    filter_items=[
        {"name": "STATUS", "label": "Status", "type": "select",
         "lov": "SELECT DISTINCT STATUS d, STATUS r FROM ORDERS ORDER BY 1"},
        {"name": "FROM",   "label": "From Date", "type": "date"},
    ],
)

apex_generate_wizard

Generate a multi-step wizard (2–6 steps) with a progress indicator, Previous/Next navigation, and page branching. What it creates per step:
  • An APEX page (start_page_id + step_index)
  • A NATIVE_PLSQL progress bar region showing step labels and a colored progress bar
  • A form region with the step’s items
  • Previous button (all steps except first), Next/Finish button
  • Page branch redirecting to the next step on NEXT submit
start_page_id
integer
required
Page ID for step 1. Subsequent steps use start_page_id+1, +2, etc.
steps
array
required
List of step definition objects. Each object:
{
  "title": "Step 1: Basic Info",
  "items": [
    {"name": "NOME",  "label": "Full Name", "type": "text",   "required": true},
    {"name": "EMAIL", "label": "Email",     "type": "text"}
  ]
}
Supported item type values: text, number, date, select, textarea, hidden.
wizard_title
string
default:"Wizard"
Header label used in log output.
auth_scheme
string
Authorization scheme applied to all step pages.
finish_redirect_page
integer
Page to redirect to after the last step is submitted. Defaults to page 1.
Example:
apex_generate_wizard(
    start_page_id=30,
    wizard_title="New Employee Onboarding",
    finish_redirect_page=10,
    steps=[
        {
            "title": "Personal Details",
            "items": [
                {"name": "FIRST_NAME", "label": "First Name", "type": "text", "required": True},
                {"name": "LAST_NAME",  "label": "Last Name",  "type": "text", "required": True},
                {"name": "HIRE_DATE",  "label": "Hire Date",  "type": "date"},
            ],
        },
        {
            "title": "Role & Department",
            "items": [
                {"name": "DEPT_ID",  "label": "Department", "type": "select",
                 "lov": "SELECT DEPT_NAME d, DEPT_ID r FROM DEPARTMENTS ORDER BY 1"},
                {"name": "JOB_TITLE","label": "Job Title",  "type": "text"},
            ],
        },
        {
            "title": "Confirmation",
            "items": [],
        },
    ],
)

apex_generate_modal_form

Create an inline modal popup (dialog) form region on an existing page — no separate dialog page needed. What it creates:
  • A NATIVE_PLSQL region placed in AFTER_FOOTER that renders a t-DialogRegion container
  • A hidden PK item inside the modal region
  • An after-submit NATIVE_PLSQL process (request = SAVE_MODAL) that MERGEs into the target table
To open the modal from a button, set the button’s action to DEFINED_BY_DA and add a Dynamic Action that executes apex.region('<static_id>').show(); where static_id is the region_static_id value returned by this tool.
page_id
integer
required
Page where the modal lives (must already be in the session).
region_name
string
required
Display name of the modal region.
table_name
string
required
Target database table for the Save process.
pk_item_name
string
required
Primary key item name suffix. Auto-prefixed with P{page_id}_ if needed.
title
string
Modal title shown in the dialog header. Defaults to region_name.
sequence
integer
default:"10"
Display sequence for the region.
auth_scheme
string
Optional authorization scheme name.
Example:
result = apex_generate_modal_form(
    page_id=10,
    region_name="Quick Edit Employee",
    table_name="EMPLOYEES",
    pk_item_name="EMP_ID",
    title="Edit Employee",
)
# result["region_static_id"] => "modal_quick_edit_employee"
# Open with: apex.region('modal_quick_edit_employee').show();

Special Component Generators

apex_add_interactive_grid

Add an editable Interactive Grid (IG) region — spreadsheet-style inline editing for multiple rows simultaneously.
page_id
integer
required
Page must exist in session.
region_name
string
required
Region display name.
table_name
string
required
Database table for DML operations.
sql_query
string
SELECT SQL for the IG. Defaults to SELECT * FROM {table_name}.
editable
boolean
default:"true"
Allow inline cell editing with INSERT/UPDATE/DELETE.
add_row
boolean
default:"true"
Show “Add Row” button in the toolbar.
sequence
integer
default:"10"
Region display order.
auth_scheme
string
Optional authorization scheme name to restrict access to this region.

apex_add_master_detail

Place a master Interactive Report and a detail Interactive Report on the same page, linked by a foreign key column. Clicking a master row sets a hidden page item and refreshes the detail IR automatically.
page_id
integer
required
Target page ID.
master_region_name
string
required
Name for the master IR region.
master_sql
string
required
SQL for the master IR.
detail_region_name
string
required
Name for the detail IR region.
detail_sql
string
required
SQL for the detail IR. Must reference a bind variable matching P{page_id}_{page_item_name} in its WHERE clause.
Column in the master IR whose value is passed to the hidden item when a row is clicked (e.g., "ID").
page_item_name
string
required
Suffix for the hidden page item that stores the selected master row value (auto-prefixed with P{page_id}_). The bind variable in detail_sql must match.
sequence
integer
default:"10"
Display sequence for the master region (detail region gets sequence + 10).

Add a faceted search panel (left-side filter select lists) linked to an Interactive Report. Creates a two-column layout with a filter region on the left and the IR on the right. Each facet generates a SELECT_LIST item; a Dynamic Action re-submits the page on filter change.
page_id
integer
required
Target page ID.
region_name
string
required
Name for the IR region.
sql_query
string
required
SQL for the Interactive Report. Must include :{item_name} bind-variable predicates for each facet column. Example:
SELECT * FROM ORDERS
 WHERE (:P10_STATUS IS NULL OR STATUS = :P10_STATUS)
   AND (:P10_REGION IS NULL OR REGION = :P10_REGION)
facets
array
required
List of facet definitions. Each object:
{
  "column": "STATUS",
  "label": "Status",
  "type": "select",
  "lov": "SELECT DISTINCT STATUS d, STATUS r FROM ORDERS ORDER BY 1"
}
Supported type values: select, checkbox (both produce a SELECT_LIST with an “All” option). The lov key is optional — omitting it auto-generates a DISTINCT query from the source SQL.
sequence
integer
default:"10"
Display sequence for the filter region (IR gets sequence + 10).

Add a real-time search text field that filters an Interactive Report on every keystroke via a Dynamic Action.
page_id
integer
required
Target page ID.
region_name
string
required
Name for the search bar region.
target_region_name
string
required
Name of the IR region to filter.
search_item_name
string
default:"BUSCA"
Item name suffix (auto-prefixed with P{page_id}_).
search_label
string
default:"Search"
Label for the search field.
placeholder
string
default:"Type to search..."
Input placeholder text.
Example:
apex_add_search_bar(
    page_id=10,
    region_name="Search Bar",
    target_region_name="Employee List",
    search_label="Filter Employees",
)

apex_add_timeline

Add a vertical timeline region rendered using Universal Theme t-Timeline CSS classes.
page_id
integer
required
Target page ID.
region_name
string
required
Region display name.
sql_query
string
required
SQL returning at least date_col, title_col, and body_col. Example:
SELECT TO_CHAR(DT_LOG,'DD/MM/YYYY') AS DT,
       DS_ACTION AS TITULO,
       DS_DETAILS AS CORPO
  FROM AUDIT_LOG
 WHERE USER_ID = :P10_USER_ID
 ORDER BY DT_LOG DESC
date_col
string
required
Column alias for the date/time label.
title_col
string
required
Column alias for the timeline item title.
body_col
string
required
Column alias for the timeline item body text.
icon_col
string
Column alias providing a Font Awesome icon class per row. Defaults to fa-circle.

apex_add_breadcrumb

Add a breadcrumb navigation region using Universal Theme t-Breadcrumb markup, rendered into the BREADCRUMB_BAR display point.
page_id
integer
required
Target page ID.
region_name
string
required
Internal region name.
entries
array
required
Ordered list of breadcrumb items. Each object:
{"label": "Home",         "page_id": 1},
{"label": "Employees",    "page_id": 10},
{"label": "Edit Record",  "page_id": null}
Pass page_id: null to render the entry as the active (non-linked) current page.

apex_add_file_upload

Add a FILE_BROWSE item plus an after-submit PL/SQL process that stores the uploaded file as a BLOB in a database table column.
page_id
integer
required
Target page ID.
region_name
string
required
Name of an existing region to place the file-browse item in.
item_name
string
required
Item name suffix (auto-prefixed with P{page_id}_).
label
string
required
Display label for the file-browse field.
table_name
string
required
Database table containing the BLOB column.
pk_item
string
required
Page item name for the primary key of the row to update.
blob_col
string
required
BLOB column name.
filename_col
string
required
VARCHAR2 column that stores the original filename.
mimetype_col
string
required
VARCHAR2 column that stores the MIME type.

apex_add_chart_drilldown

Wire a Dynamic Action that captures a JET Chart click and refreshes a detail IR with the clicked group label as a filter.
page_id
integer
required
Target page ID.
chart_region_name
string
required
Name of the existing JET Chart region to listen on.
target_item_name
string
required
Suffix for the hidden item that stores the clicked label (auto-prefixed with P{page_id}_). Must match a bind variable in the detail IR SQL.
filter_column
string
required
Chart series/group column whose label is captured (used in the DA name for clarity).
target_region_name
string
required
Name of the IR/IG region to refresh after the item is set.
Example:
# Chart SQL: SELECT STATUS LABEL, COUNT(*) VALUE FROM ORDERS GROUP BY STATUS
apex_add_chart_drilldown(
    page_id=5,
    chart_region_name="Orders by Status",
    target_item_name="FILTER_STATUS",
    filter_column="STATUS",
    target_region_name="Order Detail",
)
# Detail IR SQL must include: WHERE (:P5_FILTER_STATUS IS NULL OR STATUS = :P5_FILTER_STATUS)

Build docs developers (and LLMs) love