Skip to main content
Glama

cancel_job_run

Stop EMR Serverless job runs that are stuck, running too long, or started with incorrect parameters. This tool sends an asynchronous cancellation request to transition jobs to CANCELLED state.

Instructions

Cancel a running or pending EMR Serverless job run.

Use this when a Spark job is stuck, taking too long, or was started with incorrect parameters. The cancellation is asynchronous — the job will transition to CANCELLING and then CANCELLED state.

Args: application_id: The EMR Serverless application ID. job_run_id: The job run ID to cancel. env: Target environment — 'dev', 'uat', 'test', or 'prod'. IMPORTANT: Do NOT guess or default. Ask the user which environment if not specified.

Returns confirmation of the cancellation request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
application_idYes
job_run_idYes
envNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses key behavioral traits: the cancellation is asynchronous, with state transitions (CANCELLING → CANCELLED). It also warns about the 'env' parameter requiring explicit user input. However, it doesn't mention permissions, rate limits, or error conditions.

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?

Well-structured and front-loaded: purpose first, usage guidelines second, parameter details third, return value last. Every sentence earns its place with no wasted words, and the formatting (Args/Returns sections) enhances readability.

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?

Given no annotations, 0% schema coverage, but an output schema exists, the description is quite complete. It covers purpose, usage, parameters, and behavioral context. The output schema handles return values, so the description's 'Returns confirmation...' is sufficient. Minor gaps include lack of error handling or auth details.

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 description coverage is 0%, so the description must compensate. It explains all three parameters: 'application_id' and 'job_run_id' are identified, and 'env' is detailed with allowed values ('dev', 'uat', 'test', 'prod') and a critical usage warning. This adds substantial meaning beyond the bare 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 the specific action ('Cancel a running or pending EMR Serverless job run') and distinguishes it from all sibling tools, which are primarily about browsing, reading, listing, or managing other resources like DAGs, Confluence pages, or S3 objects. No other tool mentions job cancellation.

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 provides when-to-use guidance: 'Use this when a Spark job is stuck, taking too long, or was started with incorrect parameters.' This gives concrete scenarios for invocation, helping the agent decide when this tool is appropriate versus alternatives.

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/SrujanReddyKallu2024/MCP'

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