Skip to main content
Glama

Run a saved script

tool_use

Executes a saved script by name with optional arguments, returning its value, log lines, and paths to files it wrote for further processing.

Instructions

Run a saved script by name with args and return its value, log lines and any files it wrote (full paths; open them or pass them to other tools). Use tool_list to see what exists, tool_write when nothing fits.

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

Input Schema

NameRequiredDescriptionDefault
argsNoPassed to the script as `args`
nameYesScript name from tool_list
timeout_msNoDefault 60000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare idempotentHint=false and destructiveHint=false; the description adds meaningful behavior by disclosing the return payload (value, log lines, files written with full paths) in the absence of an output schema. It stops short of describing failure modes (script errors, timeouts at the 300000 ms cap) or whether repeated runs duplicate side effects, which the non-idempotent hint makes worth flagging.

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?

Two tight sentences, front-loaded with the action and its output, followed by the routing guidance. No filler, and the nested parenthetical is used for actionable detail rather than noise.

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 no-output-schema tool with three fully documented parameters, the description covers the essential gap by explaining what is returned, including the file-path convention. It is slightly thin on error/timeout behavior and on the side-effect surface of arbitrary scripts, which matters given destructiveHint=false.

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 100%, so the schema already documents name, args, and timeout_ms including the 60000 default. The description only restates 'by name with args' and adds no format, validation, or sizing guidance beyond it — baseline 3 is appropriate when the schema carries the semantics.

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 ('Run a saved script by name') and immediately characterizes the result ('its value, log lines and any files it wrote'), so an agent knows exactly what the tool produces. The parenthetical note about full paths being openable or passable to other tools further pins down its role in a chain of calls.

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?

Names the prerequisite discovery path ('Use tool_list to see what exists') and an explicit alternative when the tool is the wrong choice ('tool_write when nothing fits'). That is a clear when-to-use / what-to-do-instead routing rule rather than vague context.

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