Skip to main content
Glama

cancel_job

Idempotent

Cancels a running ServiceNow background job, stops waiting immediately, and requests instance-side cancellation where supported; completed work is not rolled back.

Instructions

Cancel a running background job. NowAIKit stops waiting at once and, where ServiceNow has a cancel API (ATF suite runs through CI/CD, flows), asks the instance to stop too. Work ServiceNow has already done is not rolled back.

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": {
      "job_id": "<job_id>"
    },
    "name": "cancel_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesThe job_id to cancel

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.0.1

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations, the description discloses meaningful behavior: cancellation is immediate locally, the remote stop is conditional ('where ServiceNow has a cancel API') and best-effort, and completed work is not rolled back. That last point is genuinely useful for an agent deciding whether cancelling is safe. It does not say what happens on failure or whether the call reports remote-cancel outcome, so it is not a 5.

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?

Three short sentences, each doing distinct work: purpose first, then local and remote cancellation semantics, then the non-rollback caveat. No filler and the key constraint is front-loaded.

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 single-parameter cancellation tool with annotations covering idempotency, open-world and destructiveness, the description supplies the behavior that matters most (best-effort remote cancel, no rollback). The only real gap is what the call returns or how partial failure surfaces, which is minor given no output schema exists.

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?

With one parameter at 100% schema description coverage, the schema already documents job_id and the description adds nothing about it — no indication of accepted ID formats or whether it accepts IDs from list_job_run_history. Baseline 3 applies since the schema carries the burden.

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?

The description opens with a precise verb+resource: 'Cancel a running background job.' That is unambiguous and clearly distinct from creation/read siblings like get_job or create_scheduled_job. It stops short of naming any sibling to contrast with (e.g., whether scheduled jobs are cancelled here or via update_scheduled_job), so it lands at 4 rather than 5.

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

Usage Guidelines3/5

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

Usage is only implied by the word 'Cancel' plus the 'running' qualifier; there is no explicit when-to-use or when-not-to-use statement and no named alternative for stopping other kinds of jobs. An agent can infer intent but gets no routing guidance relative to the job-management siblings.

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

Deploy Server

Other Tools