Skip to main content
Glama

insert_audio_file

Add audio files to specific tracks at precise time positions in REAPER projects for audio editing and arrangement.

Instructions

Insert an audio file onto a track at the given position (seconds).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
file_pathYes
positionYes

Implementation Reference

  • The handler function for the `insert_audio_file` tool, which is registered as an MCP tool and calls the adapter.
    @mcp.tool()
    def insert_audio_file(
        track_index: int,
        file_path: str,
        position: float,
    ) -> dict[str, Any]:
        """Insert an audio file onto a track at the given position (seconds)."""
        try:
            return _wrap(
                adapter.insert_audio_file(
                    track_index=track_index,
                    file_path=file_path,
                    position=position,
                )
            )
        except Exception as exc:
            return _err(exc)
  • The adapter method that facilitates the actual communication with the Reaper client to insert the audio file.
    def insert_audio_file(
        self,
        track_index: int,
        file_path: str,
        position: float,
    ) -> dict[str, Any]:
        return self._client.call(
            "insert_audio_file",
            track_index=track_index,
            file_path=file_path,
            position=position,
        )

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/danielkinahan/ReaMCP'

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