Skip to main content
Glama

apply_mastering_chain

Apply a mastering chain to the master track with presets for dynamic control. Choose from default, loud, or gentle settings to shape your mix's loudness and clarity.

Instructions

Add a standard mastering FX chain to the master track. Presets: default (EQ > Comp > Limiter), loud (EQ > Comp x2 > Limiter), gentle (EQ > light Comp > Limiter). After applying, use set_master_fx_parameter to dial in specific settings. Use list_master_fx + get_fx_parameters to discover parameter indices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
presetNodefault

Implementation Reference

  • The apply_mastering_chain tool function: adds a preset mastering FX chain (ReaEQ, ReaComp, ReaLimit) to the master track based on the selected preset ('default', 'loud', or 'gentle').
    @mcp.tool()
    def apply_mastering_chain(preset: str = "default") -> dict:
        """
        Add a standard mastering FX chain to the master track.
        Presets: default (EQ > Comp > Limiter), loud (EQ > Comp x2 > Limiter),
        gentle (EQ > light Comp > Limiter).
        After applying, use set_master_fx_parameter to dial in specific settings.
        Use list_master_fx + get_fx_parameters to discover parameter indices.
        """
        try:
            if preset not in MASTERING_PRESETS:
                return {
                    "success": False,
                    "error": f"Unknown preset '{preset}'. Available: {list(MASTERING_PRESETS.keys())}",
                }
            project = get_project()
            master = project.master_track
            added = []
            for fx_name in MASTERING_PRESETS[preset]:
                fx_index = master.add_fx(fx_name)
                if fx_index >= 0:
                    fx = master.fxs[fx_index]
                    added.append({"fx_index": fx_index, "name": fx.name})
            return {"success": True, "preset": preset, "fx_chain": added}
        except Exception as e:
            return {"success": False, "error": str(e)}
  • Mastering preset definitions: maps preset names to ordered lists of FX plugin names.
    MASTERING_PRESETS = {
        "default": ["ReaEQ", "ReaComp", "ReaLimit"],
        "loud":    ["ReaEQ", "ReaComp", "ReaComp", "ReaLimit"],
        "gentle":  ["ReaEQ", "ReaComp", "ReaLimit"],
    }
  • Entry point function that registers all mastering tools (including apply_mastering_chain) with the MCP server via @mcp.tool() decorator.
    def register_tools(mcp):
  • Server imports and calls register_tools from mastering_tools module, which registers apply_mastering_chain as an MCP tool.
    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)
    _reg_render(mcp)
    _reg_mastering(mcp)
Behavior3/5

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

With no annotations, the description carries the full burden. It explains the chain structure and presets, but omits critical behavioral details like whether it replaces existing master FX or appends, and any side effects (e.g., bypass status, undo behavior).

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 four sentences, front-loaded with the core purpose, then presets, then follow-up actions. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity (1 param, no output schema), the description covers the main action and presets. However, it lacks information on side effects (e.g., whether it clears existing master FX) and does not fully specify accepted preset strings, leaving gaps for a new agent.

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 only defines a string parameter with a default; the description adds meaning by naming three presets and their compositions. This compensates for the 0% schema coverage, though it does not explicitly restrict input to those three values.

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 adds a standard mastering FX chain to the master track. It distinguishes itself from siblings like 'add_fx' and 'add_master_fx' by specifying it applies a predefined chain. Listing three presets with their component order further clarifies the action.

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 implies when to use this tool (for standard mastering chains) and suggests after-use steps (set_master_fx_parameter, list_master_fx). It does not explicitly state when not to use it, but the context is clear enough.

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