Skip to main content
Glama

script_run

Runs a ReaScript from REAPER's Scripts folder and returns the script's result if reported. Requires explicit user confirmation for arbitrary local code execution.

Instructions

Run a ReaScript from REAPER's own Scripts folder and optionally read back a result.

script_path must be one of the relative paths script_list returned. Registers the script as a REAPER action if it isn't already (safe to call every time), runs it, then waits up to wait_seconds for the script to report a result via reaper.SetExtState("reaper_mcp_script_result", "last_result", , false). Scripts that don't opt into this convention — including anything that hasn't finished running (e.g. a background/defer-based script) by the time wait_seconds elapses — come back with result_found: false.

This runs arbitrary local script code. Confirm with the user before calling this unless they've already given clear, specific instruction to run this exact script.

Args: script_path: Relative path from script_list, e.g. "MyScripts/foo.lua". wait_seconds: How long to wait for a result, 0-30. Default 5.0.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_pathYes
wait_secondsNo
Behavior5/5

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

No annotations provided, but description fully discloses behavior: registers script as action, runs it, waits for result via SetExtState, and returns result_found: false if not reported or timeout. Also warns about arbitrary code execution, which is critical for safety.

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?

Description is well-structured: purpose first, then details on script_path, behavior, and safety. It is fairly concise but includes necessary context. Could be slightly more compact, but no fluff.

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?

Given 0% schema coverage and no output schema, description covers most needs: behavior, parameters, result convention, safety. Minor gap: it doesn't explicitly state the return format (e.g., JSON with result_found and result fields), but implies it. Overall adequate.

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?

Schema has no descriptions (0% coverage), but description adds meaning: script_path is relative path from script_list with example, wait_seconds is wait time 0-30 with default 5. This compensates well for missing schema info.

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 it 'Run a ReaScript from REAPER's own Scripts folder and optionally read back a result.' The verb 'Run' and the resource 'ReaScript from REAPER's Scripts folder' are specific, and it distinguishes from sibling tools by focusing on executing arbitrary scripts.

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?

Provides important usage guidance: script_path must be from script_list, and warns about safety ('Confirm with the user before calling'). It explains the result convention and behavior for scripts that don't report. However, it doesn't explicitly compare against alternatives or say when not to use.

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/xDarkzx/Reaper-MCP'

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