Skip to main content
Glama

sn_schema

Read-onlyIdempotent

Retrieve a ServiceNow table’s schema to inspect field names, types, max lengths, mandatory flags, and reference targets for accurate queries and integrations.

Instructions

Get the schema (field definitions) for a ServiceNow table. Returns field names, types, max lengths, mandatory flags, and reference targets.

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": {
      "table": "<table>",
      "profile": "<profile>"
    },
    "name": "sn_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum dictionary rows to return (1-500)
tableYesServiceNow table name (e.g. incident)
offsetNoZero-based dictionary row offset (0-10000)
profileYesConfigured ServiceNow profile name (required; no default fallback).
fields_onlyNoIf true, return only a sorted list of field names: the table's own fields only; inherited fields need the full schema
force_recacheNoBypass the per-instance metadata cache and refresh schema metadata from ServiceNow.

Output Schema

NameRequiredDescriptionDefault
dataYes
profileYesConfigured ServiceNow profile name (required; no default fallback).
metadataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.3.0
    • changedInput schema / properties / fields_only / description
      Previous value: -"If true, return only a sorted list of field names"New value: +"If true, return only a sorted list of field names: the table's own fields only; inherited fields need the full schema"
    • addedOutput schema / properties / metadata / properties / cache
      Added value: +{
      +  "enum": [
      +    "hit",
      +    "miss",
      +    "bypass",
      +    "mixed"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / metadata / properties / timing
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "total_ms": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "upstream_ms": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "watermark_ms": {
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "total_ms",
      +    "upstream_ms",
      +    "watermark_ms"
      +  ],
      +  "type": "object"
      +}
  2. Changed8 schema fields changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / fields_only / default
      Added value: +false
    • addedInput schema / properties / force_recache
      Added value: +{
      +  "default": false,
      +  "description": "Bypass the per-instance metadata cache and refresh schema metadata from ServiceNow.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 500,
      +  "description": "Maximum dictionary rows to return (1-500)",
      +  "maximum": 500,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Zero-based dictionary row offset (0-10000)",
      +  "maximum": 10000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / profile
      Added value: +{
      +  "description": "Configured ServiceNow profile name (required; no default fallback).",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "table"
      -]New value: +[
      +  "table",
      +  "profile"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "fields": {
      +          "items": {},
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "fields"
      +      ],
      +      "type": "object"
      +    },
      +    "metadata": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "kind": {
      +          "enum": [
      +            "single",
      +            "collection",
      +            "operation"
      +          ],
      +          "type": "string"
      +        },
      +        "limits": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "max_bytes": {
      +              "maximum": 14680064,
      +              "minimum": 1000,
      +              "type": "integer"
      +            },
      +            "max_records": {
      +              "exclusiveMinimum": 0,
      +              "maximum": 9007199254740991,
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "max_records",
      +            "max_bytes"
      +          ],
      +          "type": "object"
      +        },
      +        "pagination": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "mode": {
      +                  "const": "none",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "mode"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "additionalProperties": false,
      +              "properties": {
      +                "has_more": {
      +                  "type": "boolean"
      +                },
      +                "limit": {
      +                  "exclusiveMinimum": 0,
      +                  "maximum": 9007199254740991,
      +                  "type": "integer"
      +                },
      +                "mode": {
      +                  "const": "offset",
      +                  "type": "string"
      +                },
      +                "next_offset": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "offset": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "order_by": {
      +                  "items": {
      +                    "minLength": 1,
      +                    "type": "string"
      +                  },
      +                  "maxItems": 8,
      +                  "minItems": 1,
      +                  "type": "array"
      +                },
      +                "recovery": {
      +                  "const": "adjust_request_and_retry_same_offset",
      +                  "type": "string"
      +                },
      +                "returned": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                }
      +              },
      +              "required": [
      +                "mode",
      +                "limit",
      +                "offset",
      +                "returned",
      +                "has_more",
      +                "order_by"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "record_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "truncation": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "dropped_records": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "reason": {
      +              "enum": [
      +                "record_limit",
      +                "byte_limit"
      +              ],
      +              "type": "string"
      +            },
      +            "truncated": {
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "truncated"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "kind",
      +        "record_count",
      +        "limits",
      +        "pagination",
      +        "truncation"
      +      ],
      +      "type": "object"
      +    },
      +    "profile": {
      +      "description": "Configured ServiceNow profile name (required; no default fallback).",
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "data",
      +    "metadata",
      +    "profile"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds the shape of the payload but nothing about the per-instance metadata cache, refresh cost, or the profile requirement — all of which live only in the schema. Useful but modest value beyond annotations.

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 compact sentences, front-loaded with the action and resource, then the return contents. No filler, no restated title.

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 an output schema, full parameter coverage and rich annotations, the definition supplies enough for correct invocation. The remaining gap is workflow context — when in a discovery sequence to fetch schema versus sampling rows — which the description never addresses.

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%, including nuanced entries for fields_only (own vs inherited fields) and force_recache (cache bypass). The description adds no parameter-level meaning at all, so the 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?

Names a specific verb+resource ('Get the schema ... for a ServiceNow table') and clarifies with '(field definitions)', then enumerates what comes back (names, types, max lengths, mandatory flags, reference targets). That makes it plainly distinct from sn_query/sn_get, though it never names an alternative tool explicitly.

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

Usage Guidelines2/5

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

The description contains no when-to-use or when-not-to-use guidance, no mention of when to call it versus sn_query/sn_discover, and no statement of the required profile prerequisite. The only usage signal is implicit in the returned-field list.

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