Shared components in Oracle APEX are reusable resources that span all pages of an application. Unlike page-level components (regions, items, buttons), shared components are defined once at the application level and referenced by name wherever they are needed. apex-mcp provides tools to create and inspect the most commonly used shared component types: Lists of Values (LOVs) for populating select lists, authorization schemes that control access to pages and components, navigation menu items for side-bar navigation, and application items and processes that store session context and run application-wide logic.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.
All
apex_add_* shared component tools require an active import session. Call apex_create_app before using them. The apex_list_* tools (read-only inspection) work without an import session.Lists of Values (LOVs)
A shared LOV defines the query or static set used to populate select lists, radio groups, checkbox groups, and other choice-based items. Defining it once and referencing it by name keeps select list definitions consistent and easy to update.apex_add_lov
Create a shared List of Values.- SQL (Dynamic)
- Static
Unique name for this LOV (e.g.
"DEPARTMENTS", "STATUS_LIST"). Referenced by name in apex_add_item(lov_name=...). Use names that describe the data, not the page — LOVs are shared across all pages.Type of LOV:
| Value | Description |
|---|---|
sql | Dynamic LOV from a SQL query executed at runtime |
static | Fixed list of display/return value pairs defined at design time |
SQL query for The column aliases
lov_type="sql". Must return exactly two columns: the first is the display value shown to the user, the second is the return value stored in the item.d (display) and r (return) are conventional but any names work. Always include ORDER BY for consistent user experience.List of
{"display": "...", "return": "..."} objects for lov_type="static". Internally converted to a UNION ALL SQL expression. Use for small, fixed option sets such as status flags or yes/no choices.Explicit return column name. Auto-detected from the SQL query when omitted.
Explicit display column name. Auto-detected from the SQL query when omitted.
SQL LOVs always query the database at runtime. Add a
WHERE active = 'Y' or similar filter to exclude inactive records, and ensure the query is indexed for fast response.apex_list_lovs
List all shared LOVs for an application.Application ID.
{ "status": "ok", "data": [...], "count": N }. Each element includes lov_name, lov_type (source type), lov_query, created_on, and updated_on.
Authorization Schemes
Authorization schemes are PL/SQL function bodies that return a BOOLEAN. APEX evaluates them to decide whether a user may access a page, region, item, or button. When the function returnsFALSE, APEX renders the configured error message.
apex_add_auth_scheme
Create an authorization scheme.Unique name for the scheme. The
IS_ prefix convention (e.g. IS_ADMIN, IS_MANAGER, IS_CLINIC_USER) makes authorization references self-documenting when applied to pages and components.PL/SQL function body that must return BOOLEAN. Return Do not raise exceptions for unauthorized access — return
TRUE to grant access, FALSE to deny it. Has access to:apex_application.g_user— current APEX usernameapex_util.get_session_state('ITEM_NAME')— read any application item- Standard Oracle built-ins
FALSE instead.Message displayed to the user when access is denied.
Controls when APEX re-evaluates the scheme:
| Value | When re-evaluated |
|---|---|
BY_USER_BY_SESSION | Once per user session (default) — best performance for role-based schemes |
BY_USER_BY_PAGE_VIEW | On every page view |
NO_CACHING | Always — use for schemes that depend on data that changes mid-session |
Authorization schemes created with
apex_add_auth_scheme use NATIVE_FUNCTION_BODY as the scheme type, which maps to “PL/SQL Function Body” in the App Builder UI. This is the most flexible type and covers virtually all role/permission patterns.apex_list_auth_schemes
List all authorization schemes for an application.Application ID.
{ "status": "ok", "data": [...], "count": N }. Each element includes authorization_scheme_name, authorization_scheme_type, attribute_01 (the PL/SQL function body), error_message, and caching.
Navigation
The Navigation Menu is a shared list that APEX renders as the side-bar (or top-bar) navigation for Universal Theme applications. apex-mcp adds items to the default navigation list created byapex_create_app.
apex_add_nav_item
Add an item to the navigation menu.Display text for the navigation item (e.g.
"Dashboard", "Employees").Page ID to navigate to when the item is clicked. apex-mcp generates the standard APEX URL:
f?p=&APP_ID.:{target_page}:&APP_SESSION.::&DEBUG.:::.Display order in the menu. Use multiples of 10 to allow future insertions. Items with the same
parent_item are ordered relative to each other.Font APEX icon class. Common choices:
| Class | Usage |
|---|---|
fa-home | Home / Dashboard |
fa-users | Users, People |
fa-table | Data, Reports |
fa-cog | Settings, Configuration |
fa-bar-chart | Analytics, Charts |
fa-user | Profile, Account |
fa-file-text-o | Documents, Reports |
fa-shield | Security, Admin |
fa-plus | Add, New |
fa-search | Search |
Authorization scheme name (from
apex_add_auth_scheme) that controls visibility. Leave empty to show the item to all authenticated users.Name of an existing navigation item to nest this item under. The parent item must already have been created before calling
apex_add_nav_item with parent_item. Creates a two-level hierarchy in the side-bar.Keep the top-level navigation to 7 ± 2 items for usability. Group related pages under a parent item rather than listing them all at the top level.
Application-Level Components
Application items and processes operate at the session level, not the page level. Use them to store user context (current role, clinic ID, preferences) and to run initialization logic once per session.apex_add_app_item
Create an application item — a session-level variable accessible on every page via&APP_ITEM_NAME. or apex_util.get_session_state('APP_ITEM_NAME').
Item name, stored in uppercase. Prefix with
APP_ to distinguish application items from page items (P{n}_). Examples: APP_USER_ROLE, APP_CLINIC_ID, APP_THEME_PREFERENCE.Security protection level:
Always use
| Value | Meaning |
|---|---|
I | Restricted — cannot be set via URL parameter (recommended for security-sensitive items) |
C | Checksum required — can be set via URL with a valid checksum |
I (Restricted) for items that hold user roles, IDs, or any security-sensitive data.Optional PL/SQL expression to initialize the item value when the session starts.
apex_add_app_process
Create an application process that runs at the application or session level, independent of any specific page.Display name for the process.
PL/SQL anonymous block to execute. Has access to:
:APP_USER— the authenticated APEX usernameapex_util.set_session_state()/apex_util.get_session_state()— read/write application items- Standard Oracle PL/SQL built-ins
EXCEPTION WHEN OTHERS or WHEN NO_DATA_FOUND handler to prevent a failing process from breaking the user session.When to execute the process:
| Value | When it runs |
|---|---|
ON_NEW_INSTANCE | On every new session — ideal for loading user context into APP_* items |
ON_SUBMIT | On every page submit across the application |
BEFORE_LOGIN | Before the login page authenticates the user |
AFTER_LOGIN | Immediately after successful login |
Execution order when multiple application processes exist.
Optional condition:
ITEM_IS_NULL or ITEM_IS_NOT_NULL. Leave empty to always run.Item name for the condition check.
Application processes with
ON_NEW_INSTANCE run once when a new session is created (i.e. when the user first visits the application or a new session token is issued). They do not re-run on subsequent page requests in the same session, making them efficient for loading session context.