Skip to main content
Glama
sonisoft-cnanda

now-sdk-ext-mcp

Query Delete Records

query_delete_records

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

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

No annotations are provided, so the description fully discloses behavior: dry-run vs execute, permanence of deletion, and irreversibility. It states 'this PERMANENTLY DELETES records' and 'This operation cannot be undone,' giving the agent full awareness of consequences.

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 paragraphs: first explains functionality and dry-run, second is an important warning. Every sentence is necessary and front-loaded with purpose. No extraneous information.

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 5 parameters, 100% schema coverage, and no output schema, the description provides sufficient context: how to use dry-run safely, the importance of confirm, and the permanent nature. An agent can determine correct invocation without ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear descriptions for each parameter. The description adds value by explaining the critical confirm parameter behavior (dry-run vs execute) and providing an example for query. However, for instance, table, and limit, the description doesn't add much beyond the schema.

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 it finds records matching an encoded query and deletes them. The verb 'delete' and resource 'records from a ServiceNow table' are specific. It distinguishes from read-only query_table and update tool query_update_records by explicitly stating deletion.

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

Usage Guidelines5/5

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

Explicitly describes dry-run mode (confirm=false) to preview count before actual deletion, and instructs 'Always run a dry-run first to verify the match count before committing.' Warns that operation is permanent and cannot be undone, providing clear when-to-use and safety precautions.

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