Skip to main content
Glama

create_track

Add a new track to the end of a REAPER project, specifying type: audio, MIDI, instrument, or folder.

Instructions

Create a new track at the end of the project. track_type: audio, midi, instrument, folder

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
track_typeNoaudio

Implementation Reference

  • The create_track tool handler: creates a new track at the end of the project, supports audio, midi/instrument, and folder types.
    def create_track(name: str, track_type: str = "audio") -> dict:
        """
        Create a new track at the end of the project.
        track_type: audio, midi, instrument, folder
        """
        try:
            project = get_project()
            idx = project.n_tracks
            project.add_track(idx, name)
            track = project.tracks[idx]
    
            if track_type in ("midi", "instrument"):
                RPR.SetMediaTrackInfo_Value(track.id, "I_RECINPUT", 4096)  # All MIDI inputs
            elif track_type == "folder":
                RPR.SetMediaTrackInfo_Value(track.id, "I_FOLDERDEPTH", 1)
    
            return {
                "success": True,
                "track_index": idx,
                "name": track.name,
                "type": track_type,
            }
        except Exception as e:
            logger.error(f"create_track failed: {e}")
            return {"success": False, "error": str(e)}
  • Type signature: takes name (str) and optional track_type (str, default 'audio'), returns dict.
    def create_track(name: str, track_type: str = "audio") -> dict:
  • Registration via @mcp.tool() decorator inside register_tools function.
    def register_tools(mcp):
    
        @mcp.tool()
  • The server.py imports and calls register_tools from track_tools.py, which registers create_track on the MCP server.
    from reaper_mcp.track_tools import register_tools as _reg_track
    from reaper_mcp.midi_tools import register_tools as _reg_midi
    from reaper_mcp.fx_tools import register_tools as _reg_fx
    from reaper_mcp.audio_tools import register_tools as _reg_audio
    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)
  • Helper get_project() used by create_track to obtain the current REAPER project.
    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 must disclose behavioral traits. It only mentions the position 'at the end of the project' and lists track types, but omits side effects, permissions, or what happens to existing tracks. Very minimal disclosure.

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 concise sentences with no redundant information. Every word serves a purpose.

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 tool's simplicity (2 params, no output schema), the description covers the basics but lacks contextual details like default track properties, behavior when name is duplicated, or confirmation of creation. Adequate but not comprehensive.

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 description adds meaning for the 'track_type' parameter by listing valid values (audio, midi, instrument, folder), which the schema lacks. However, the 'name' parameter is left without any explanation beyond its schema definition. Schema coverage is 0%, so the description partially compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'Create a new track' and specifies it adds at the end of the project. However, it does not explicitly distinguish from sibling tools like create_bus or create_midi_item, which have different purposes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, nor any conditions or prerequisites. Usage context is completely absent.

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