Skip to main content
Glama

add_volume_automation

Add a volume automation point to a track at a specified time and dB level. The volume envelope must be visible in REAPER.

Instructions

Add a volume automation point on a track. The volume envelope must be visible in REAPER (right-click track > Show envelope). position: time in seconds. value_db: volume level in dB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
positionYes
value_dbYes

Implementation Reference

  • The actual tool handler function 'add_volume_automation' that adds a volume automation point on a track. It gets the project, finds the track by index, looks up the 'Volume' envelope, converts dB to linear, inserts the point, sorts points, and returns success/error.
    def add_volume_automation(track_index: int, position: float, value_db: float) -> dict:
        """
        Add a volume automation point on a track.
        The volume envelope must be visible in REAPER (right-click track > Show envelope).
        position: time in seconds. value_db: volume level in dB.
        """
        try:
            project = get_project()
            track = project.tracks[track_index]
            envelope = RPR.GetTrackEnvelopeByName(track.id, "Volume")
            if not envelope:
                return {
                    "success": False,
                    "error": (
                        "Volume envelope not found. Show it first: right-click the track "
                        "in REAPER and choose 'Show envelope for track volume'."
                    ),
                }
            linear_val = _db_to_linear(value_db)
            RPR.InsertEnvelopePoint(envelope, position, linear_val, 0, 0, False, True)
            RPR.Envelope_SortPoints(envelope)
            return {"success": True, "track_index": track_index, "position": position, "value_db": value_db}
        except Exception as e:
            return {"success": False, "error": str(e)}
  • The function signature serves as the schema: accepts track_index (int), position (float seconds), and value_db (float dB). Returns a dict with success, track_index, position, value_db or error.
    def add_volume_automation(track_index: int, position: float, value_db: float) -> dict:
        """
        Add a volume automation point on a track.
        The volume envelope must be visible in REAPER (right-click track > Show envelope).
        position: time in seconds. value_db: volume level in dB.
        """
  • The 'add_volume_automation' tool is registered via the @mcp.tool() decorator inside the register_tools(mcp) function in mixing_tools.py.
    def register_tools(mcp):
    
        @mcp.tool()
        def add_volume_automation(track_index: int, position: float, value_db: float) -> dict:
  • In server.py, mixing_tools.register_tools is imported as _reg_mixing and called with the mcp instance (line 25), which triggers the decorator-based registration of all mixing tools including add_volume_automation.
    from reaper_mcp.mixing_tools import register_tools as _reg_mixing
    from reaper_mcp.render_tools import register_tools as _reg_render
    from reaper_mcp.mastering_tools import register_tools as _reg_mastering
    from reaper_mcp.analysis_tools import register_tools as _reg_analysis
    
    _reg_project(mcp)
    _reg_track(mcp)
    _reg_midi(mcp)
    _reg_fx(mcp)
    _reg_audio(mcp)
    _reg_mixing(mcp)
  • The _db_to_linear helper function converts dB values to linear scale, used by add_volume_automation to convert the value_db parameter before inserting the envelope point.
    def _db_to_linear(db: float) -> float:
        if db <= -150:
            return 0.0
        return 10 ** (db / 20.0)
Behavior3/5

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

Without annotations, the description bears full responsibility. It explains the basic behavior—adding a point—and parameter meanings. However, it does not describe error conditions (e.g., if envelope is not visible), side effects, or return behavior, leaving some behavioral gaps.

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 extremely concise with three sentences: purpose, prerequisite, and parameter explanations. Every sentence adds value, and the critical information is front-loaded.

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 simple tool with no output schema and no annotations, the description adequately covers purpose, prerequisite, and parameter semantics. It could be slightly more complete by mentioning potential errors or return value, but it is sufficient for an agent to understand usage.

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 has 0% description coverage, so the description must compensate. It explains 'position: time in seconds' and 'value_db: volume level in dB,' adding meaning to two of three parameters. track_index is left implicit, but its purpose is fairly self-evident from the context.

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 action: 'Add a volume automation point on a track.' This is a specific verb-resource combination that distinguishes it from sibling tools like add_pan_automation or set_track_volume.

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?

The description provides a crucial prerequisite: 'The volume envelope must be visible in REAPER (right-click track > Show envelope).' This guides the user on necessary conditions, though it does not explicitly state when not to use this tool versus alternatives.

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