Skip to main content
Glama

set_tempo

Change the tempo of your Ableton Live session to a specific BPM value, allowing you to adjust the project speed for music production.

Instructions

Set the tempo of the Ableton session.

Parameters:

  • tempo: The new tempo in BPM

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tempoYes

Implementation Reference

  • MCP tool handler for set_tempo that forwards the command to the Ableton remote script via socket.
    @mcp.tool()
    def set_tempo(ctx: Context, tempo: float) -> str:
        """
        Set the tempo of the Ableton session.
        
        Parameters:
        - tempo: The new tempo in BPM
        """
        try:
            ableton = get_ableton_connection()
            result = ableton.send_command("set_tempo", {"tempo": tempo})
            return f"Set tempo to {tempo} BPM"
        except Exception as e:
            logger.error(f"Error setting tempo: {str(e)}")
            return f"Error setting tempo: {str(e)}"
  • Actual implementation in Ableton remote script that sets the Live song tempo using the Live API.
    def _set_tempo(self, tempo):
        """Set the tempo of the session"""
        try:
            self._song.tempo = tempo
            
            result = {
                "tempo": self._song.tempo
            }
            return result
        except Exception as e:
            self.log_message("Error setting tempo: " + str(e))
            raise
  • Helper check identifying set_tempo as a state-modifying command that requires additional delays and timeouts.
    is_modifying_command = command_type in [
        "create_midi_track", "create_audio_track", "set_track_name",
        "create_clip", "add_notes_to_clip", "set_clip_name",
        "set_tempo", "fire_clip", "stop_clip", "set_device_parameter",
        "start_playback", "stop_playback", "load_instrument_or_effect"
    ]
  • Dispatch logic in remote script command router that calls the _set_tempo handler.
    elif command_type == "set_tempo":
        tempo = params.get("tempo", 120.0)
        result = self._set_tempo(tempo)
    elif command_type == "fire_clip":
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Set the tempo') but lacks critical details: whether this is a mutation (implied but not explicit), what permissions are needed, if it affects playback immediately, or potential side effects. This is inadequate for a tool that likely modifies session state.

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 front-loaded with the core purpose in the first sentence, followed by a concise parameter explanation. Every sentence adds value without waste, making it efficient and well-structured for quick understanding.

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 moderate complexity (single parameter mutation), no annotations, and no output schema, the description is minimally adequate. It covers the basic action and parameter meaning but lacks behavioral context, usage guidelines, and output details, leaving gaps that could hinder effective tool invocation.

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 adds meaningful semantics beyond the schema: it explains that 'tempo' is 'The new tempo in BPM', clarifying the unit and purpose. With 0% schema description coverage and only one parameter, this compensates well, though it doesn't specify valid ranges (e.g., typical BPM limits).

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 verb 'Set' and the resource 'tempo of the Ableton session', making the purpose specific and understandable. However, it doesn't differentiate from siblings like 'start_playback' or 'stop_playback' which also affect session timing, leaving room for minor ambiguity.

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. It doesn't mention prerequisites (e.g., session must be open), exclusions, or related tools like 'get_session_info' for checking current tempo, leaving the agent with no usage context.

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