Skip to main content
Glama

compare_instances

Read-only

Compare record counts for a table (with optional query) and system property values across two configured ServiceNow instances to detect dev-to-prod drift and support governance.

Instructions

Compare two configured ServiceNow instances: record counts for a table (with optional query) and/or a specific system property value. Useful for dev→prod drift detection and governance.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "instance_a": "<instance_a>",
      "instance_b": "<instance_b>"
    },
    "name": "compare_instances"
  }
}

Input Schema

NameRequiredDescriptionDefault
asyncNoRun as a background job and return a job_id at once. Poll it with get_job. Calls that take longer than about 20 seconds switch to a job on their own.
queryNoEncoded query to scope the count (optional)
tableNoTable to compare record counts for (optional)
propertyNoA sys_properties name to compare values for (optional)
instance_aYesFirst instance name (as configured)
instance_bYesSecond instance name (as configured)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv5.0.1
    • addedInput schema / properties / async
      Added value: +{
      +  "description": "Run as a background job and return a job_id at once. Poll it with get_job. Calls that take longer than about 20 seconds switch to a job on their own.",
      +  "type": "boolean"
      +}
  2. Addedv4.9.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds the drift-detection framing and the 'configured instances' constraint, but says nothing about failure modes when an instance name is not configured, whether counts are live or cached, or how results are reported; the async/job fallback behavior is only conveyed by the schema, not the description.

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?

Two tight sentences with the capability statement front-loaded and the use case following. No filler, no restatement of the tool name, and every clause carries information.

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 annotations present and full schema coverage, the description covers what an agent needs to attempt a call. It is slightly thin on what happens when table and property are both omitted and on the shape of the comparison output, but there is no output schema so return-format detail is not strictly required.

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 coverage is 100%, so all six parameters are documented in structured fields, which sets the baseline at 3. The description contributes the 'and/or' framing that at least one of table or property should be supplied, but leaves it ambiguous whether calling with neither is valid, so it does not materially extend the schema.

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?

The description names a specific verb (compare) and resource (two configured ServiceNow instances) and enumerates the two comparable facets: table record counts and sys_properties values. It is clear enough to act on without opening the schema, but it never distinguishes itself from the closely overlapping sibling compare_record_counts, leaving the agent to guess which one to pick.

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?

'Useful for dev→prod drift detection and governance' gives a scenario, so the intent is implied rather than spelled out. There is no when-not guidance, no statement about prerequisites (e.g. both instances must already be configured), and no routing to alternatives such as list_instances or compare_record_counts.

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