Skip to main content
Glama

run_script

Launch a local Python script as a detached GPU VM job with periodic Drive checkpoints and automatic save/stop. Set detach to return immediately, then use job_status or attach_job to monitor.

Instructions

Run a local Python script on the active GPU VM as a detached managed job.

Restores previous files, uploads the script (or an explicitly selected source directory), checkpoints to Drive periodically with verified uploads, saves on exit, then stops by default. The job keeps running on the VM if this call is interrupted. With detach=true the call returns right after launch; follow with job_status or attach_job. Only workspace files are saved.

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>"
    },
    "name": "run_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
detachNo
projectNodefault
argumentsNo
stop_afterNo
script_pathYes
source_directoryNo
checkpoint_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.1
    • addedInput schema / properties / detach
      Added value: +{
      +  "default": false,
      +  "title": "Detach",
      +  "type": "boolean"
      +}
  2. First observedv0.2.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does it well: it discloses the full lifecycle (restore previous files, upload, periodic verified checkpointing to Drive, save on exit, stop by default), states the call survives interruption, and warns that "Only workspace files are saved." It omits failure/error behavior, auth or runtime prerequisites, and what identifier is returned to use with job_status/attach_job.

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?

Front-loaded with the core action, then a tight lifecycle sentence, then the two operational caveats (survives interruption, workspace-only persistence). Every clause adds information an agent needs and there is no filler or restatement of the tool name.

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 7-parameter, multi-step job launcher with no annotations and no output schema, the description covers the execution lifecycle and persistence constraint but leaves the return value (presumably a job identifier) unexplained and drops two parameters. An agent can call it, but may not know how to correlate the launched job with job_status or attach_job afterward.

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 coverage is 0%, so the description must compensate and it partially does: detach=true's return behavior, source_directory as an explicitly selected upload root, checkpoint_seconds as the periodic checkpoint interval, and stop_after via "stops by default" are all given meaning beyond the schema. However, `project` and `arguments` are never mentioned, leaving two of seven parameters entirely undocumented.

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?

Opens with a specific verb+resource+target: "Run a local Python script on the active GPU VM as a detached managed job." The managed-job framing and GPU VM target distinguish it from siblings like start_runtime, prepare_workspace, and save_workspaces without the agent needing to open any schema.

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?

Gives a clear follow-up path for the detached case: "With detach=true the call returns right after launch; follow with job_status or attach_job." That routes the agent to the right sibling for the main ambiguity. It does not state when NOT to use this tool (e.g. versus a non-detached alternative) or any prerequisites such as runtime being started.

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