Skip to main content
Glama

apex_add_item_validation

Add server-side validation to Oracle APEX page items. Enforce required fields, regex patterns, length limits, or custom PL/SQL rules with clear error messages.

Instructions

Add server-side validation to a page item (NOT_NULL, REGEX, SQL, PL/SQL).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYesPage ID containing the item.
sequenceNoValidation execution order.
item_nameYesThe item to validate (e.g., "P10_NAME"). Auto-prefixed if needed.
error_messageNoMessage shown when validation fails. Auto-generated if omitted.
condition_itemNoOnly validate if this item is not null (optional).
validation_nameYesName for this validation (e.g., "Name Required").
validation_typeNoType of validation: - "not_null": Item must not be empty (default) - "max_length": Item must not exceed N chars (set N in validation_expression) - "min_length": Item must have at least N chars - "regex": Item must match regex pattern (set pattern in validation_expression) - "plsql_expression": PL/SQL expression that returns TRUE/FALSE - "plsql_function": PL/SQL function body that returns NULL (valid) or error message - "item_not_null_or_zero": Item must not be null or zero (for number fields)not_null
validation_expressionNoExpression for the validation type: - For max_length/min_length: the length as string (e.g., "100") - For regex: the regex pattern (e.g., "^[0-9]+$") - For plsql_expression: PL/SQL boolean expression (e.g., ":P10_AGE > 0 AND :P10_AGE < 120") - For plsql_function: PL/SQL function body returning NULL or error message

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate a write operation (readOnlyHint=false) and non-destructive behavior; the description adds context by specifying 'server-side' and listing validation categories. However, it mentions 'SQL' as a supported type while the input schema's validation_type options do not include an explicit 'sql' type, which could mislead an agent. It also does not disclose whether repeated calls create duplicate validations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, front-loaded with the verb and object, and contains no unnecessary filler. The parenthetical list is compact and helpful despite the minor 'SQL' ambiguity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the rich input schema (100% parameter coverage) and the presence of an output schema, the description does not need to explain return values or param syntax. It adequately complements the schema by stating the tool's purpose, though it could be slightly more explicit about duplicate behavior and the exact validation types supported.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with detailed explanations and examples for all 8 parameters, including validation_type options and expression formats. The description itself adds little parameter-specific meaning beyond the summary list of validation types, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Add') and a clear resource ('server-side validation to a page item'), and the parenthetical enumeration of validation types further clarifies scope. This distinguishes it from sibling tools like apex_add_process or apex_add_item_computation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context: this tool adds server-side validation to a page item, which implies when it should be used. It does not explicitly name alternatives or exclusions, but the 'server-side' qualifier and resource focus provide enough situational clarity for most agents.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TechFernandesLTDA/apex-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server