Skip to main content
Glama

get_component_api

Fetch the real props, events, and slots for a ServiceNow Next Experience UI component from your configured instance before writing custom markup.

Instructions

Looks up the REAL, current API (properties, slots, and dispatched actions/events) of a Now/Next Experience UI Framework component — e.g. now-button, now-input, now-select — as it actually exists on the user's own configured ServiceNow instance. The lookup uses sys_ux_lib_component for the tag and the related sys_ux_macroponent row through root_component to read the component's actual props, dispatched_events, and availableSlots from root_component_definition, which may be newer or richer than what is published to public npm. Call this BEFORE writing custom markup/logic that duplicates something a platform component already provides, so the real component and its actual props/events/slots get used instead of a hand-rolled equivalent. Use search_instance_components first if you do not already know the exact tag. Requires the target instance to be configured via environment variables (NEXT_UI_INSTANCE_URL and credentials).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentTagYesThe component's HTML tag name, e.g. "now-button" or "now-input".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it names the backing tables (sys_ux_lib_component, root_component, root_component_definition), warns results may be newer/richer than public npm, and states the environment/auth prerequisite (NEXT_UI_INSTANCE_URL plus credentials). It also enumerates what comes back (props, dispatched_events, availableSlots).

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

Conciseness4/5

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

It is longer than typical, but front-loaded with purpose and each sentence contributes (source tables, npm caveat, pre-call guidance, prerequisite). The dense em-dash clause is slightly heavy but no sentence is disposable.

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

Completeness5/5

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

No output schema exists, so the description must convey return content — it does by listing props, dispatched events, and slots and their source. Combined with the auth prerequisite and the alternative-tool routing, an agent has everything needed to invoke this correctly.

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

Parameters4/5

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

Schema coverage is 100% and the single parameter is fully documented in the schema with an example value. The description adds marginal context by explaining the tag is resolved against sys_ux_lib_component, but the schema already does the substantive work, so the baseline of 4 applies.

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?

Specific verb+resource: looks up the live API (props, slots, dispatched events) of a Now/Next Experience UI component, with concrete tag examples. It distinguishes itself from siblings search_instance_components and resolve_component_package by emphasizing the instance-resident source of truth rather than published package metadata.

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

Usage Guidelines5/5

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

Explicit when-to-use ('Call this BEFORE writing custom markup/logic that duplicates something a platform component already provides') and a named alternative with a clear selection condition ('Use search_instance_components first if you do not already know the exact tag'). Both the positive trigger and the pre-requisite routing are stated.

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