Skip to main content
Glama
now-sdk-ext-mcp

now-sdk-ext-mcp

Insert Metadata Record

insert_metadata_record

Inserts ServiceNow application metadata such as script includes, business rules, and properties through the record form in a specified application and update set, then reads back the captured record.

Instructions

Insert application metadata (a script include, business rule, UI action, property, ...). Writes through the record's form in the named application and update set, then reads back the record and its capture. Refuses protected files, the platform's own schema tables, and access controls (use the ACL tools). Writing code (a script, a server condition, Jelly, a javascript: value, or switching such a record on) is refused when the session does not permit running scripts.

Input Schema

NameRequiredDescriptionDefault
viewNoThe form view to load. The default view when omitted.
scopeNoThe record's application: its scope name (e.g. "x_acme_app"), or "global". Give this or scope_id.
tableYesThe metadata table, e.g. sys_script_include, sys_ui_action, sys_properties.
fieldsNoField values by column name: text, numbers, booleans, null, lists of text (glide lists), or a duration ({days, hours, minutes, seconds}). Dot-walked names are not supported; fields not on the form are refused.
instanceNoThe ServiceNow instance auth alias to connect to. This is the alias configured via `snc configure` (e.g., "myinstance", "prod", "test"). The user will typically refer to this by name when saying things like "on my myinstance instance". If not provided, falls back to the SN_AUTH_ALIAS environment variable.
scope_idNoThe record's application by sys_scope sys_id, instead of scope.
variablesNoVariable values by element name (for records with a variables column).
update_setYessys_id of an In progress update set of that application (create_update_set). The capture is verified there; for adding a column and for layout saves it must also be the working set (set_current_update_set).
initial_queryNoInsert only: equality terms the new form starts from (sysparm_query), e.g. collection=incident^type=1.
variable_fieldNoThe variables column, when the table has more than one.
acknowledge_upgrade_skipNoOnly for an installed Store application, and only after the user has reviewed the change: upgrades of that application then skip this file until the customization is reviewed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.5.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the write profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true). The description adds genuinely non-redundant behavior: the write goes through the form in a specific application and update set, the record and its capture are read back, and three classes of targets are refused. Score should be higher than 3 – the refusals and the script-permission gate are real behavioral context beyond annotations. A 5 is more accurate: the description discloses guardrails (protection, ACL, script execution permission) and post-write verification that the annotations cannot convey.

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?

Three sentences, front-loaded with purpose, then mechanism, then refusals. Dense but every clause carries information. Slightly heavy syntax (the long parenthetical list of code kinds) costs a bit of readability.

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?

For an 11-parameter mutation tool with no output schema, the description covers the write path, the verification/read-back, and the refusal conditions an agent must anticipate. It does not describe failure modes beyond refusal (e.g. what happens when the update set is not in progress), but the schema covers that constraint.

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%, so the schema already documents every parameter, including the update-set working-set requirement and the initial_query equality-term format. The description adds only that the application and update set are "named", which is already implied. Baseline 3 applies.

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

Purpose4/5

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

Opens with a specific verb and resource ("Insert application metadata") and enumerates concrete examples (script include, business rule, UI action, property). It also states the mechanism (writes through the record's form in the named application and update set) and the read-back. It does not explicitly name insert vs update_metadata_record / batch_create_records as alternatives, so sibling differentiation relies on the verb alone.

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?

Gives real when-not guidance: refuses protected files, the platform's own schema tables, and access controls, explicitly routing ACL work to the ACL tools. Adds a session-permission condition for code-bearing writes. It does not say when to prefer batch_create_records or update_metadata_record instead, which is the main remaining gap.

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

Deploy Server

Other Tools