Skip to main content
Glama
actors-mcp-server

actors-mcp-server

Official
by apify

Abort Actor run

abort-actor-run
DestructiveIdempotent

Abort an Actor run that is starting or running when it takes too long or is misconfigured; returns updated run details after the abort request.

Instructions

Abort an Actor run that is currently starting or running. For runs with status SUCCEEDED, FAILED, ABORTING, ABORTED, or TIMED-OUT, this call has no effect. The results will include the updated run details after the abort request.

USAGE:

  • Use when you need to stop a run that is taking too long or misconfigured.

USAGE EXAMPLES:

  • user_input: Abort run y2h7sK3Wc

  • user_input: Gracefully abort run y2h7sK3Wc

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": {
      "runId": "<runId>"
    },
    "name": "abort-actor-run"
  }
}

Input Schema

NameRequiredDescriptionDefault
runIdYesThe ID of the Actor run to abort.
gracefullyNoIf true, the Actor run will abort gracefully with a 30-second timeout.

Output Schema

NameRequiredDescriptionDefault
tipNoAdvisory guidance RAG Web Browser wrote to its key-value store under the reserved "TIP" key
runIdYesActor run ID
statsNoRun statistics
statusYesRun status: READY | RUNNING | TIMING-OUT | TIMED-OUT | ABORTING | ABORTED | SUCCEEDED | FAILED
actorIdYesStable Apify Actor ID from the run record
summaryYesPast-tense summary of the run state
exitCodeNoActor process exit code; populated for terminal states (especially FAILED)
nextStepYesOne primary follow-up action with identifiers interpolated
storagesYesDataset and key-value store metadata, keyed by alias. "default" is always the primary entry.
actorNameNo"username/actor-name"
startedAtNoISO timestamp when the run started
finishedAtNoISO timestamp when the run finished (terminal states only)
statusMessageNoPass-through from Apify run.statusMessage
apifyConsoleUrlNoPersonalized Apify Console link to the run; present only for Console sessions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.21.5
    • changedOutput schema / properties / storages / properties / datasets / additionalProperties / properties / fields / description
      Previous value: -"Dataset field paths in dot notation (e.g. [\"metadata.url\"])"New value: +"Paths that work as a fields selection (e.g. [\"results\", \"metadata.url\"]); an array field appears by its top-level name."
    • changedOutput schema / properties / storages / properties / datasets / properties / default / properties / fields / description
      Previous value: -"Dataset field paths in dot notation (e.g. [\"metadata.url\"])"New value: +"Paths that work as a fields selection (e.g. [\"results\", \"metadata.url\"]); an array field appears by its top-level name."
  2. Changed1 schema field changedv0.18.2
    • addedOutput schema / properties / tip
      Added value: +{
      +  "description": "Advisory guidance RAG Web Browser wrote to its key-value store under the reserved \"TIP\" key",
      +  "properties": {
      +    "caveat": {
      +      "description": "Present when this session cannot run the Actor the tip recommends",
      +      "type": "string"
      +    },
      +    "level": {
      +      "description": "Omitted when the Actor wrote an unrecognized level",
      +      "enum": [
      +        "info",
      +        "warning"
      +      ],
      +      "type": "string"
      +    },
      +    "message": {
      +      "description": "Truncated to 300 characters, with a trailing ellipsis if the Actor's message was longer",
      +      "type": "string"
      +    },
      +    "recommendedActorId": {
      +      "description": "Apify Actor ID the tip recommends, when it names one",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "message"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changedv0.15.3
    • addedOutput schema / properties / storages / properties / datasets / required
      Added value: +[
      +  "default"
      +]
    • addedOutput schema / properties / storages / properties / keyValueStores / required
      Added value: +[
      +  "default"
      +]
  4. Addedv0.14.0
  5. Removedv0.13.0
  6. Changed14 schema fields changedv0.11.4
    • addedOutput schema / properties / storages / properties / datasets / additionalProperties / properties / apifyConsoleUrl
      Added value: +{
      +  "description": "Personalized Apify Console link to the dataset; present only for Console sessions",
      +  "type": "string"
      +}
    • addedOutput schema / properties / storages / properties / datasets / additionalProperties / properties / fields
      Added value: +{
      +  "description": "Dataset field paths in dot notation (e.g. [\"metadata.url\"])",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / storages / properties / datasets / additionalProperties / properties / id / description
      Added value: +"Dataset ID"
    • addedOutput schema / properties / storages / properties / datasets / additionalProperties / properties / inflatedBytes
      Added value: +{
      +  "description": "Approximate uncompressed byte size of the dataset. Use with itemCount to pick limit/fields before fetching.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / storages / properties / datasets / additionalProperties / properties / itemCount
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / storages / properties / datasets / additionalProperties / properties / name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / storages / properties / datasets / additionalProperties / properties / title
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / storages / properties / datasets / properties / default / properties / cleanItemCount
      Removed value: -{
      -  "type": "number"
      -}
    • addedOutput schema / properties / storages / properties / keyValueStores / additionalProperties / properties / apifyConsoleUrl
      Added value: +{
      +  "description": "Personalized Apify Console link to the store; present only for Console sessions",
      +  "type": "string"
      +}
    • addedOutput schema / properties / storages / properties / keyValueStores / additionalProperties / properties / id / description
      Added value: +"Key-value store ID"
    • addedOutput schema / properties / storages / properties / keyValueStores / additionalProperties / properties / keyCount
      Added value: +{
      +  "description": "Total number of keys (omitted when truncated)",
      +  "type": "number"
      +}
    • addedOutput schema / properties / storages / properties / keyValueStores / additionalProperties / properties / keys
      Added value: +{
      +  "description": "Up to 50 key names",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / storages / properties / keyValueStores / additionalProperties / properties / name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / storages / properties / keyValueStores / additionalProperties / properties / title
      Added value: +{
      +  "type": "string"
      +}
  7. Changed1 schema field changedv0.11.3
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "actorId": {
      +      "description": "Stable Apify Actor ID from the run record",
      +      "type": "string"
      +    },
      +    "actorName": {
      +      "description": "\"username/actor-name\"",
      +      "type": "string"
      +    },
      +    "apifyConsoleUrl": {
      +      "description": "Personalized Apify Console link to the run; present only for Console sessions",
      +      "type": "string"
      +    },
      +    "exitCode": {
      +      "description": "Actor process exit code; populated for terminal states (especially FAILED)",
      +      "type": "number"
      +    },
      +    "finishedAt": {
      +      "description": "ISO timestamp when the run finished (terminal states only)",
      +      "type": "string"
      +    },
      +    "nextStep": {
      +      "description": "One primary follow-up action with identifiers interpolated",
      +      "type": "string"
      +    },
      +    "runId": {
      +      "description": "Actor run ID",
      +      "type": "string"
      +    },
      +    "startedAt": {
      +      "description": "ISO timestamp when the run started",
      +      "type": "string"
      +    },
      +    "stats": {
      +      "description": "Run statistics",
      +      "properties": {
      +        "computeUnits": {
      +          "type": "number"
      +        },
      +        "memMaxBytes": {
      +          "type": "number"
      +        },
      +        "runTimeSecs": {
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "status": {
      +      "description": "Run status: READY | RUNNING | TIMING-OUT | TIMED-OUT | ABORTING | ABORTED | SUCCEEDED | FAILED",
      +      "type": "string"
      +    },
      +    "statusMessage": {
      +      "description": "Pass-through from Apify run.statusMessage",
      +      "type": "string"
      +    },
      +    "storages": {
      +      "description": "Dataset and key-value store metadata, keyed by alias. \"default\" is always the primary entry.",
      +      "properties": {
      +        "datasets": {
      +          "additionalProperties": {
      +            "properties": {
      +              "id": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id"
      +            ],
      +            "type": "object"
      +          },
      +          "description": "Map of dataset alias → metadata. Key \"default\" is always the run's primary dataset.",
      +          "properties": {
      +            "default": {
      +              "properties": {
      +                "apifyConsoleUrl": {
      +                  "description": "Personalized Apify Console link to the dataset; present only for Console sessions",
      +                  "type": "string"
      +                },
      +                "cleanItemCount": {
      +                  "type": "number"
      +                },
      +                "fields": {
      +                  "description": "Dataset field paths in dot notation (e.g. [\"metadata.url\"])",
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "id": {
      +                  "description": "Dataset ID",
      +                  "type": "string"
      +                },
      +                "inflatedBytes": {
      +                  "description": "Approximate uncompressed byte size of the dataset. Use with itemCount to pick limit/fields before fetching.",
      +                  "type": "number"
      +                },
      +                "itemCount": {
      +                  "type": "number"
      +                },
      +                "name": {
      +                  "type": "string"
      +                },
      +                "title": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "id"
      +              ],
      +              "type": "object"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "keyValueStores": {
      +          "additionalProperties": {
      +            "properties": {
      +              "id": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id"
      +            ],
      +            "type": "object"
      +          },
      +          "description": "Map of key-value store alias → metadata. Key \"default\" is always the run's primary store.",
      +          "properties": {
      +            "default": {
      +              "properties": {
      +                "apifyConsoleUrl": {
      +                  "description": "Personalized Apify Console link to the store; present only for Console sessions",
      +                  "type": "string"
      +                },
      +                "id": {
      +                  "description": "Key-value store ID",
      +                  "type": "string"
      +                },
      +                "keyCount": {
      +                  "description": "Total number of keys (omitted when truncated)",
      +                  "type": "number"
      +                },
      +                "keys": {
      +                  "description": "Up to 50 key names",
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "name": {
      +                  "type": "string"
      +                },
      +                "title": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "id"
      +              ],
      +              "type": "object"
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "summary": {
      +      "description": "Past-tense summary of the run state",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "runId",
      +    "actorId",
      +    "status",
      +    "storages",
      +    "summary",
      +    "nextStep"
      +  ],
      +  "type": "object"
      +}
  8. First observedv0.10.13

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds genuinely new behavior: the no-op on terminal statuses, the 30-second graceful timeout, and the fact that updated run details are returned — useful for confirming idempotency. It omits auth/permission requirements, which keeps it off 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.

Conciseness4/5

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

The core sentence is front-loaded and the status list is high-value. The USAGE and USAGE EXAMPLES blocks are somewhat redundant — the two example lines mostly restate the runId and gracefully parameters — but they are short and do not obscure the main statement.

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?

The tool has an output schema and rich annotations, so return values and safety profile need not be re-explained; the description still usefully notes that updated run details are returned. For a two-parameter mutation, the remaining gap is authorization scope and whether an in-flight abort can be undone, but overall coverage is adequate.

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%, including the meaning of 'gracefully' and its 30-second timeout, so the schema does the heavy lifting. The description's examples ('Abort run y2h7sK3Wc' vs 'Gracefully abort run y2h7sK3Wc') only illustrate the two modes already documented in the schema, adding no new semantic depth. Baseline 3 applies.

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?

States a specific verb and resource ('Abort an Actor run') plus a precise scope constraint ('currently starting or running'), and enumerates the terminal statuses on which the call is a no-op. This makes the tool's domain unmistakable against the sibling getters and scrapers, none of which share this capability.

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?

Explicitly says when to use it ('stop a run that is taking too long or misconfigured') and, via the status list, effectively says when not to bother (SUCCEEDED, FAILED, ABORTING, ABORTED, TIMED-OUT). It stops short of naming alternative tools or describing escalation paths, so it sits just below the top band.

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