Skip to main content
Glama

reload_script

Reload Python controller code from disk to update running simulations. Recompiles ScriptNode references or re-executes standalone scripts, enabling iterative debugging.

Instructions

Reload a Python controller from a file on disk.

Two modes, chosen automatically:

  • If any Action-Graph ScriptNode references this file (inputs:scriptPath), those ScriptNodes are force-recompiled so your on-disk edits take effect on the running graph. This is how you iterate on a ScriptNode controller.

  • Otherwise the file is (re-)executed as a standalone controller, the way you would use execute_script for code longer than ~20 lines.

Workflow:

  1. Write the controller as a .py file (attach via create_action_graph script_file=... for ScriptNode use)

  2. reload_script to load / recompile it

  3. step_simulation to debug (frozen timeline) or play for a ScriptNode demo

  4. Edit the file and reload_script again to iterate

The file's directory is auto-added to sys.path.

Args: file_path: Path to the Python file on disk. module_name: Optional module name to reload (e.g. 'my_controller'). timeout_s: Cooperative Python deadline; capped by extension policy. max_output_bytes: Per-stream capture limit; capped by policy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
timeout_sNo
command_idNo
module_nameNo
idempotency_keyNo
max_output_bytesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden, and it delivers: it discloses automatic mode selection, force-recompilation of ScriptNodes, standalone re-execution, sys.path mutation, timeout capping, and output byte capture limits. This goes well beyond a generic action statement and tells the agent what side effects to expect.

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?

The description is organized effectively: purpose first, then modes, workflow, and finally parameter notes. Each paragraph adds necessary information, and the key distinguishing behavior is front-loaded. The length is justified by the tool's two-mode complexity.

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?

For a complex six-parameter tool with no schema descriptions and no annotations, the description covers most of what an agent needs: purpose, modes, workflow, sys.path effect, and policy caps. The main completeness gap is the undocumented command_id and idempotency_key parameters, which are likely important for execution control and retry semantics. An output schema exists, so return-value documentation is not a major gap.

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?

The input schema provides zero descriptions, so the description must compensate. It explains file_path, module_name, timeout_s, and max_output_bytes meaningfully. However, command_id and idempotency_key are not explained at all, leaving two parameters without any semantics beyond their names.

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 opens with a specific verb and resource: 'Reload a Python controller from a file on disk.' It goes further by distinguishing the two automatic modes (ScriptNode recompilation vs standalone re-execution), which clearly separates this tool from siblings like reload_script_node and execute_script. The purpose is unambiguous and not a tautology.

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 description explicitly explains when each mode applies and names related tools and the workflow: write a .py file, reload_script, step_simulation to debug, then edit and reload. It also references execute_script as an alternative for shorter code, giving the agent concrete routing guidance. This is strong, actionable usage guidance.

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

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/Tim0320/IsaacSim-MCP'

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