Skip to main content
Glama

query_table

Query ServiceNow tables with sysparm_query filters to find records like incidents, change requests, and assets. Returns human-readable display values for reference fields.

Instructions

Query any ServiceNow table using a sysparm_query filter. Use this to find records — incidents, change requests, hardware assets, anything. Returns human-readable display values for reference fields. Subject to the table + field allowlist; some tables and fields will be denied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax records to return. Hard cap: 50. Default: 10.
queryNosysparm_query filter string. Example: 'active=true^priority=1'. Some identity-revealing filters (like caller_id) are denied. Max 500 chars.
tableYesServiceNow table name. Allowed tables: 'incident', 'kb_knowledge', 'sc_request', 'change_request'. Other tables will be denied.
fieldsNoComma-separated list of fields to return. Disallowed fields are silently dropped. Omit to return the full set of allowed fields for the table.
Behavior4/5

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

With no annotations, the description carries the burden. It discloses two key behaviors: returns human-readable display values for reference fields, and enforces an allowlist (some tables/fields denied). It does not mention error handling or response format, but these are not critical for selection and invocation.

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 three sentences, front-loaded with the primary action, and every sentence adds value: purpose, usage, and key behavioral constraints. No redundant or filler content.

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?

Given no annotations or output schema, the description provides adequate context: purpose, constraints, and return behavior. It does not detail response structure, but the schema covers parameters well, making the tool sufficiently understood for typical use.

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 baseline is 3. The description adds minimal meaning beyond the schema (e.g., 'sysparm_query filter' is already in param description). It reinforces the allowlist, but does not substantially augment parameter understanding.

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's purpose with a specific verb ('Query') and resource ('ServiceNow table'), and lists example use cases ('incidents, change requests, hardware assets'). It distinguishes from siblings by emphasizing querying via sysparm_query filter rather than fetching a single record, counting, or searching KB.

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?

The description provides clear usage context ('Use this to find records...') and mentions constraints (allowlist). It does not explicitly exclude alternatives (e.g., get_record for single record retrieval), but the context is clear enough for an agent to choose this for broad queries.

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/dadshorts/sn-mcp'

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