Skip to main content
Glama

create_widget

Generate a complete, production-ready Service Portal widget with HTML, CSS, client and server scripts, and option schema from a requirement description.

Instructions

Generate a complete, production-ready Service Portal widget from a requirement description.

Generates all 4 sections with best practices baked in:

  • HTML template: panel layout, loading/error states, AngularJS binding

  • CSS: theme-variable-based styling (no hardcoded colors)

  • Client script: c.data pattern, c.server.update(), spUtil feedback

  • Server script: try/catch, input dispatcher, GlideRecord with limit

  • Option schema: title + limit + any custom options

Returns deploy-ready payload + best practices + deploy instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesWidget display name
idNoWidget ID (kebab-case, used in URL and as CSS class)
descriptionNo
data_sourceNoTable to load data from (e.g. "incident")
fieldsNo
actionsNo
optionsNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions generating deploy-ready payload and best practices but lacks details on potential side effects (e.g., overwriting existing widgets), permission requirements, or failure modes. The statement is comprehensive but not exhaustive.

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 well-structured with bullet points and sub-bullets, front-loading the main purpose. Each sentence adds value without redundancy. It is appropriately sized for the tool's complexity.

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

Completeness3/5

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

The description covers generated artifacts and return payload components but omits details on tool prerequisites (e.g., required instance configuration), output format structure, or constraints like rate limits. For a complex tool with no output schema, this leaves some ambiguity.

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

Parameters2/5

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

Schema coverage is 43%, a significant gap. The description does not elaborate on parameter meanings beyond what the schema already provides. For example, 'fields' and 'actions' are mentioned in generated sections but not explained in terms of parameter usage. The description fails to compensate for the low 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 states the tool generates a complete, production-ready Service Portal widget from a requirement description. It lists all generated sections (HTML, CSS, Client script, Server script, Option schema) and distinguishes from siblings like update_widget and clone_widget by implying it creates new widgets from scratch.

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

Usage Guidelines3/5

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

The description implies usage for creating new widgets but does not explicitly state when to use this tool versus alternatives (e.g., update_widget, clone_widget). No guidance on prerequisites or scenarios where it should not be used.

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/pinnintisagarSB/ServiceNow-Dev-MCP'

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