Skip to main content
Glama

set_track_pan

Set the pan balance of any track in REAPER with a value from -1.0 (full left) to 1.0 (full right), where 0.0 is center.

Instructions

Set track pan. -1.0 = full left, 0.0 = center, 1.0 = full right.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
panYes

Implementation Reference

  • The function that executes the set_track_pan tool logic. Sets a track's pan value (-1.0 left to 1.0 right) using reapy.
    def set_track_pan(track_index: int, pan: float) -> dict:
        """Set track pan. -1.0 = full left, 0.0 = center, 1.0 = full right."""
        try:
            project = get_project()
            track = project.tracks[track_index]
            track.pan = pan
            return {"success": True, "track_index": track_index, "pan": track.pan}
        except Exception as e:
            return {"success": False, "error": str(e)}
  • The @mcp.tool() decorator registers set_track_pan as an MCP tool. The registration happens when register_tools(mcp) is called from server.py.
    @mcp.tool()
    def set_track_pan(track_index: int, pan: float) -> dict:
        """Set track pan. -1.0 = full left, 0.0 = center, 1.0 = full right."""
        try:
            project = get_project()
            track = project.tracks[track_index]
            track.pan = pan
            return {"success": True, "track_index": track_index, "pan": track.pan}
        except Exception as e:
            return {"success": False, "error": str(e)}
  • server.py calls _reg_track(mcp) which invokes register_tools from track_tools.py, thus registering set_track_pan.
    _reg_track(mcp)
  • Helper function used by set_track_pan to get the REAPER project and ensure the API connection is active.
    def get_project() -> reapy.Project:
        ensure_connected()
        return reapy.Project()
Behavior2/5

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

With no annotations, the description carries the full burden. It discloses the pan value range but fails to mention potential side effects (e.g., overwriting automation) or whether the track must exist.

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 a single sentence with a clear value mapping. Every word is necessary and focused, achieving maximal conciseness.

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 the tool's simplicity (2 params, no output schema), the description is nearly complete. It covers the pan parameter and purpose but could note the validity of track_index.

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 schema has 0% description coverage, so the description must compensate. It explains the pan parameter's range but ignores track_index. This adds partial value beyond the schema.

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 the tool sets track pan, a specific resource. It defines the range of pan values (-1.0 to 1.0), distinguishing it from sibling tools like set_track_volume or set_track_mute.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for setting static pan but lacks explicit guidance on when to use versus alternatives like add_pan_automation. No context on prerequisites or exclusions is provided.

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/bonfire-audio/reaper-mcp'

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