Skip to main content
Glama

Cancel an AI search job

cancel_ai_search
DestructiveIdempotent

Cancels an AI-search job from ai_search_projects. A queued job releases its full credit reservation. A running job stops at the next batch boundary and keeps the charge for records already confirmed. A finished job is unchanged. Does not use credits.

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": {
      "jobId": "<jobId>"
    },
    "name": "cancel_ai_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYesFrom ai_search_projects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (destructive=true, idempotent=true) by disclosing what destruction actually means per job state: full credit reservation released for queued, stop at next batch boundary with confirmed records still charged for running, and no change for finished. It also states explicitly that the call does not consume credits, which is the key cost concern an agent would have.

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?

Four short sentences, front-loaded with the action and then branching by job state; every sentence carries a distinct fact. Slight redundancy between 'Cancels an AI-search job' and the title, but nothing is wasted.

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?

For a single-parameter cancellation with no output schema, the definition covers the action, the affected resource, the credit consequences for each job state, and the idempotent-safe framing. Nothing material an agent needs before calling it is missing.

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?

Single parameter with 100% schema description coverage, so baseline 3 applies; the description adds only that the job belongs to ai_search_projects, which the schema already conveys, and gives no format or retrieval detail beyond 'From ai_search_projects.'

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?

Opens with a specific verb and resource ('Cancels an AI-search job') and anchors the object to the ai_search_projects collection, so an agent can distinguish it from read/query siblings like get_ai_search_result and from creation tools like ai_search_projects.

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?

Usage is clear by implication and the state-dependent outcomes (queued/running/finished) make the intended call context obvious, but the description never explicitly states when to use this versus letting a job run or re-issuing a search, and names no alternative.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources