Skip to main content
Glama

Cancel DataLens Spark application

datalens_sparkapplications_cancel

Stops a Spark application and returns the cancellation operation using the specified cluster and application IDs.

Instructions

Stop a Spark application and return the operation that cancels it.

Experimental in the DataLens API, written from its document and never called: not measured.

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": {
      "cluster_id": "<cluster_id>",
      "application_id": "<application_id>"
    },
    "name": "datalens_sparkapplications_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoSend nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none).
cluster_idYesId of the Spark cluster.
application_idYesId of the Spark application.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.142.2
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "default": false,
      +  "description": "Send nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none).",
      +  "type": "boolean"
      +}
  2. Addedv0.122.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and openWorldHint=true, so the write/asynchronous profile is partly covered. The description adds genuinely new context by saying it returns an operation rather than the final application state, and by flagging the endpoint as experimental and never exercised. It stops short of saying what happens to in-flight jobs or whether the cancel can be undone.

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?

Two short sentences with the action and return value front-loaded and no filler. The experimental caveat is condensed, though its phrasing ("written from its document and never called: not measured") is slightly cryptic and could be stated more cleanly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter mutation with full annotation coverage and full schema documentation, the main remaining gap is the missing output schema, which the description partially closes by naming the returned operation. Still absent are the effects of cancellation on the running job and the reliability caveat's practical consequence for an agent deciding to call it.

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 description coverage is 100% — cluster_id, application_id, and the dry_run preview flag are each documented in the schema itself. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

"Stop a Spark application and return the operation that cancels it" states a specific verb and resource, and the return contract (an operation handle) is explicit. It implicitly separates itself from the sibling get/list/create tools by being the mutation path, though it never names a sibling directly.

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: an agent can infer this is the tool for terminating a running application, and the sibling list contains get/list for inspection. There is no explicit statement of when to prefer this over, say, letting a job finish, and no prerequisites such as required permissions or application state.

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