Skip to main content
Glama

yade_interrupt_task

Interrupt a running YADE task: sets an interrupt flag and optionally injects a TaskInterrupt exception to terminate deadloops. Preserves the namespace for later inspection.

Instructions

Request interruption of a running YADE task.

Two cancellation paths are applied together by the bridge:

  • flag_only — sets an interrupt flag that YADE's PyRunner tick observes between simulation iterations (graceful path for O.run tasks).

  • flag_and_async_exc — in addition, injects a TaskInterrupt exception into the script thread, so pure-Python deadloops with no O.run on the stack are terminated too.

The response method field reports which path ran. When async-exc is refused (e.g. target thread is a Dummy-N boost::python frame), async_exc_skipped_reason explains why.

Namespace after interrupt: the YADE __main__ namespace is shared between tasks and yade_execute_code calls. Any variables the interrupted script had already defined — including O state — are preserved. There's no need to re-run the whole script to continue work: inspect state with yade_execute_code or resume via a fresh yade_execute_task that only runs the remaining logic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesTask ID returned by yade_execute_task

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description bears full burden. It discloses the two cancellation paths (flag_only and flag_and_async_exc), response fields, and crucial context about namespace preservation after interrupt.

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 description is well-structured with clear sections and no wasted words. Slightly verbose for some, but all information is necessary for understanding the complex behavior.

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?

Given the tool's complexity, the description covers the cancellation paths, response, and namespace implications thoroughly. An output schema exists, so return values need not be detailed; the description adds valuable context.

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?

Only one parameter (task_id) with 100% schema coverage. The description does not add extra meaning beyond the schema's description, meeting the baseline.

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 'Request interruption of a running YADE task' and explains the two cancellation paths in detail. It distinguishes itself from siblings by focusing exclusively on interruption.

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?

The description explains when to use the tool (to interrupt a running task) and describes the two paths. It implicitly provides context via the sibling tools, but lacks explicit when-not-to-use or comparison with 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/yusong652/yade-mcp'

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