Skip to main content
Glama

yade_execute_task

Submit a Python script for asynchronous background execution in YADE, returning a task_id immediately so long simulation runs and multi-stage pipelines queue and run in order.

Instructions

Submit a Python script for asynchronous execution in YADE.

Returns a task_id immediately; the script is queued and runs in the background. Tasks run one at a time in submit order (they share the YADE process and its single simulation state), so a multi-stage pipeline can be submitted in one go — each stage starts when the previous one finishes. Use the companion tools to manage the task lifecycle:

  • yade_check_task_status: poll output, progress, and final status

  • yade_interrupt_task: stop a running task or cancel a queued one

  • yade_list_tasks: browse task history (also shows queue order)

Use this for production simulation runs, long O.run() cycles, and any operation that may take minutes or longer. For quick queries and REPL-style testing, use yade_execute_code.

O.engines[0] holds a PyRunner that belongs to the bridge (its command calls _mcpPyrunnerTick). The script does not need to keep it: assign O.engines as usual, the bridge re-adds the PyRunner before every O.run().

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": {
      "script_path": "<script_path>",
      "description": "<description>"
    },
    "name": "yade_execute_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
descriptionYesBrief task purpose
script_pathYesAbsolute path to entry Python script for YADE

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.3
    • removedInput schema / properties / entry_script
      Removed value: -{
      -  "description": "Absolute path to entry Python script for YADE",
      -  "type": "string"
      -}
    • addedInput schema / properties / script_path
      Added value: +{
      +  "description": "Absolute path to entry Python script for YADE",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "entry_script",
      -  "description"
      -]New value: +[
      +  "script_path",
      +  "description"
      +]
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Even with no explicit annotations, the description is rich in behavioral context. It clarifies that the tool returns a task_id immediately, operates asynchronously/in the background, and requires the use of companion tools (yade_check_task_status, etc.) to manage the full lifecycle.

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 detailed and appropriately sized for the complexity of the function. While it is quite long, its structure is highly effective, grouping related information (mechanism, lifecycle tools, usage context) logically.

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?

This tool involves complex asynchronous execution and shared state, yet the description is maximally complete. It covers execution context, concurrency constraints, usage patterns, and the necessity of using specific companion tools for full functionality.

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?

The input schema covers the required parameters (script_path and description) with 100% coverage. The description adds necessary but minimal semantic value by explaining the purpose of the task_id and providing context on parameter usage constraints.

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 provides a precise definition: 'Submit a Python script for asynchronous execution.' It clearly distinguishes this tool from siblings by specifying its role in long-running tasks and contrasting it with yade_execute_code for quick queries.

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?

The tool explicitly dictates when to use it (production simulation, long O.run() cycles, tasks taking minutes) and when not to (quick queries/REPL testing). It also outlines specific behavioral constraints, such as sequential execution order within the shared YADE process.

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