apex_add_global_js
Add global JavaScript to all pages in Oracle APEX by injecting code into Page 0.
Instructions
Add global JavaScript to all pages via Page 0.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"function_name": "<function_name>",
"javascript_code": "<javascript_code>"
},
"name": "apex_add_global_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | Description of what this JS does. | |
| function_name | Yes | Function name / identifier (e.g., "TEA_UTILS"). Used only as a label; the JS itself can define multiple functions. | |
| javascript_code | Yes | The full JavaScript code. Can be multiple functions. Will be wrapped in an IIFE to avoid polluting global scope unless the code already starts with '(' or 'var '/'let '/'const '. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |