Skip to main content
Glama

create_ui_policy

Control field behavior dynamically by creating a UI Policy with conditions, scripts, and settings to show, hide, or update fields based on user actions.

Instructions

Create a new UI Policy to control field behavior dynamically (requires SCRIPTING_ENABLED=true)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable to apply this policy on
activeNoWhether to activate immediately (default: true)
scriptNoOptional script to run when conditions are met
conditionsNoEncoded query conditions that trigger the policy
run_scriptsNoRun script in addition to UI actions (default: false)
short_descriptionYesPolicy description
Behavior3/5

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

Annotations already indicate mutation (readOnlyHint=false) and non-destructive behavior. The description adds the SCRIPTING_ENABLED=true requirement, which is valuable context beyond annotations, but it does not disclose potential side effects of script execution or behavior when the prerequisite is not met.

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?

A single, front-loaded sentence that conveys the core action, resource, purpose, and a key requirement without redundancy. Every word contributes to the tool's understanding.

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?

With complete schema descriptions, annotations covering mutation and safety, and simple create semantics, the description covers the essential purpose and prerequisite. It does not mention return values or post-create behavior, but that is not critical for a creation tool, especially with no output schema.

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?

The input schema has 100% coverage with meaningful descriptions for all six parameters, so the description does not need to repeat them. The description adds no parameter-specific detail beyond the overall purpose, matching the baseline for high schema coverage.

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 clearly identifies the action ('Create'), the resource ('UI Policy'), and its purpose ('to control field behavior dynamically'). This distinguishes it from sibling tools like create_ui_action or create_flow by specifying the exact artifact type and its behavioral goal.

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 provides a clear use case ('control field behavior dynamically') and a concrete prerequisite ('requires SCRIPTING_ENABLED=true'). It does not explicitly name alternatives or state when not to use it, but the context is sufficiently clear for selection.

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/aartiq/servicenow-mcp'

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