Skip to main content
Glama
sonisoft-cnanda

now-sdk-ext-mcp

Query Delete Records

query_delete_records
DestructiveIdempotent

Find and delete all ServiceNow records matching an encoded query, with dry-run preview to avoid accidental permanent deletion.

Instructions

Find records matching an encoded query and delete them all. Supports a dry-run mode: set confirm=false (the default) to see how many records would be deleted WITHOUT making changes, then set confirm=true to execute.

IMPORTANT: When confirm=true, this PERMANENTLY DELETES records on the ServiceNow instance. Always run a dry-run first to verify the match count before committing. This operation cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of records to delete. If omitted, deletes all matches.
queryYesAn encoded query string to find records to delete. Examples: "active=false^sys_created_on<javascript:gs.daysAgoStart(365)".
tableYesThe ServiceNow table to delete records from (e.g., "incident", "sys_user").
confirmNoWhen false (default), performs a dry-run that returns the match count without deleting anything. Set to true to actually execute the deletes.
instanceNoThe ServiceNow instance auth alias (e.g., "myinstance", "prod"). If not provided, falls back to the SN_AUTH_ALIAS environment variable.
Behavior5/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description adds critical behavioral details: the dry-run mechanism, permanence of deletion, and the 'cannot be undone' warning. This significantly enhances an agent's understanding of the tool's side effects.

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 concise, front-loaded with the core action, and each sentence serves a purpose. The prominent safety warning is essential and effectively communicates the destructive nature without unnecessary verbosity.

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?

Given the destructive nature and absence of an output schema, the description covers all essential aspects: the operation, dry-run workflow, and irreversible consequences. It provides sufficient guidance for an agent to invoke the tool safely and correctly.

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%, with detailed descriptions for all five parameters including the confirm semantics. The description reinforces the confirm behavior but does not add substantial new meaning beyond the schema's already thorough parameter documentation.

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 function: 'Find records matching an encoded query and delete them all.' This uses a specific verb and resource, highlighting the scoped deletion, and distinguishes it from sibling query/update tools.

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?

Provides clear context for safe use, emphasizing the dry-run mode and instructing to 'Always run a dry-run first to verify the match count before committing.' However, it does not explicitly mention alternatives or exclusions, which prevents a 5.

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/sonisoft-cnanda/now-sdk-ext-mcp'

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