Skip to main content
Glama

create_midi_track

Add a MIDI track to your Ableton Live session at a specified position to organize and expand your music project.

Instructions

Create a new MIDI track in the Ableton session.

Parameters:

  • index: The index to insert the track at (-1 = end of list)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNo

Implementation Reference

  • MCP tool handler for create_midi_track. Gets Ableton connection and sends the internal create_midi_track command to the remote script with the index parameter.
    @mcp.tool()
    def create_midi_track(ctx: Context, index: int = -1) -> str:
        """
        Create a new MIDI track in the Ableton session.
        
        Parameters:
        - index: The index to insert the track at (-1 = end of list)
        """
        try:
            ableton = get_ableton_connection()
            result = ableton.send_command("create_midi_track", {"index": index})
            return f"Created new MIDI track: {result.get('name', 'unknown')}"
        except Exception as e:
            logger.error(f"Error creating MIDI track: {str(e)}")
            return f"Error creating MIDI track: {str(e)}"
  • Input schema from function signature and docstring: index (int, default -1). Returns str describing the result.
    def create_midi_track(ctx: Context, index: int = -1) -> str:
        """
        Create a new MIDI track in the Ableton session.
        
        Parameters:
        - index: The index to insert the track at (-1 = end of list)
        """
  • Registration of the tool using FastMCP @mcp.tool() decorator.
    @mcp.tool()
  • Helper function in Ableton remote script implementing the actual track creation using Ableton Live API: self._song.create_midi_track(index)
    def _create_midi_track(self, index):
        """Create a new MIDI track at the specified index"""
        try:
            # Create the track
            self._song.create_midi_track(index)
            
            # Get the new track
            new_track_index = len(self._song.tracks) - 1 if index == -1 else index
            new_track = self._song.tracks[new_track_index]
            
            result = {
                "index": new_track_index,
                "name": new_track.name
            }
            return result
        except Exception as e:
            self.log_message("Error creating MIDI track: " + str(e))
            raise
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Create' implies a write operation, the description doesn't address permissions, side effects (e.g., impact on existing tracks), error conditions, or what happens upon success. This leaves significant gaps for a mutation tool.

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 and well-structured: one sentence states the purpose, followed by a clear 'Parameters:' section with a bullet point explaining the parameter. Every element earns its place with zero wasted words.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It covers the basic purpose and parameter but lacks critical behavioral details (e.g., what the tool returns, error handling, or side effects), making it insufficient for safe and effective use by an AI 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 description explicitly documents the single parameter 'index', explaining its purpose ('The index to insert the track at') and providing semantic clarification for the value '-1' ('end of list'). With 0% schema description coverage, this adds meaningful context beyond the bare schema, though it doesn't cover edge cases like invalid indices.

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 MIDI track') and the target resource ('in the Ableton session'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from potential sibling tools that might also create tracks or similar resources, though no obvious direct siblings exist in the provided list.

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, prerequisites, or contextual constraints. It simply states what the tool does without indicating appropriate scenarios or exclusions.

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/ahujasid/ableton-mcp'

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