Skip to main content
Glama

Bulk Delete Records

servicenow_bulk_delete
Destructive

Delete multiple records from a ServiceNow table based on a query. Preview changes with dry-run before committing permanent deletion.

Instructions

Delete multiple records matching a query. Dry-run by default — always preview before committing.

Args:

  • table (string): Target table

  • query (string): Encoded query to select records to delete

  • dry_run (boolean): Preview without deleting (default: true). Set false to commit.

  • limit (number): Safety cap — max records to delete (default 20, max 100)

  • response_format: Output format

⚠️ Deletion is permanent. Always run with dry_run=true first to confirm scope.

Examples:

  • Preview stale test incidents → table="incident", query="short_descriptionLIKEtest^state=7^sys_created_onRELATIVELT@year@ago@2", dry_run=true

  • Remove obsolete CI records → table="cmdb_ci", query="install_status=7^sys_updated_onRELATIVELT@year@ago@5", dry_run=true

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (1–100, default 20)
queryNoEncoded ServiceNow query string (e.g., 'state=1^priority=1^assigned_to=javascript:gs.getUserID()'). Leave empty to return all records.
tableYesServiceNow table name (e.g., incident, change_request, sys_user)
dry_runNoPreview without deleting — set false to commit (default: true)
response_formatNoOutput format: 'markdown' (default) for human-readable or 'json' for structured datamarkdown
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description adds critical context: 'Deletion is permanent', the default dry-run behavior, and the safety cap (limit max 20/100). It warns about irreversible consequences and explains the preview-first workflow, going well beyond the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with an Args list and examples, but it's longer than necessary since the Args section largely duplicates the input schema. The warning and examples are valuable, so the extra length is justified, yet could be trimmed.

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?

For a destructive tool with no output schema, the description covers the essential behavior: what it deletes, how to preview, safety limits, and output format options via response_format. Since the input schema is thorough and the tool is relatively simple, the description is sufficiently complete, though return value details are absent.

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?

The schema covers 100% of parameters with descriptions, but the tool description adds value by clarifying that 'limit' is a 'Safety cap — max records to delete' (while the schema misleadingly says 'Maximum number of results to return'), and explains the dry_run default behavior in context. It also provides encoded query examples that demonstrate syntax.

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 'Delete multiple records matching a query', a specific verb and resource that distinguishes it from sibling tools like servicenow_delete_record (single delete) and servicenow_bulk_update. The bulk scope is explicit.

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?

The description provides explicit usage guidance: 'Dry-run by default — always preview before committing' and 'Always run with dry_run=true first to confirm scope.' It advises a safe workflow and includes concrete examples with table/query patterns, making it clear when and how to use this tool.

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/kylburns89/servicenow-mcp-server'

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