Skip to main content
Glama
Strudel MCP Server

Strudel MCP Server

export_midi

Exports the current Strudel pattern to a MIDI file by parsing note(), n(), and chord() functions, with optional tempo, duration, filename, and base64 output settings.

Instructions

Export current pattern to MIDI file. Parses note(), n(), and chord() functions.

Input Schema

NameRequiredDescriptionDefault
bpmNoTempo in BPM (default: the pattern's own tempo, or 120 if it declares none)
formatNoOutput format: file or base64 (default: base64)
durationNoExport duration in bars (default: 4)
filenameNoOutput filename (optional, default: pattern.mid)
session_idNoOptional session ID (#108). Routes the capture to the named session, which has its own recorder — concurrent captures across sessions are safe (#180).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.1.1
    • changedInput schema / properties / bpm / description
      Previous value: -"Tempo in BPM (default: 120)"New value: +"Tempo in BPM (default: the pattern's own tempo, or 120 if it declares none)"
    • changedInput schema / properties / session_id / description
      Previous value: -"Optional session ID (#108). Routes page reference to the named session. Note: AudioCaptureService is currently server-wide — concurrent captures across sessions will conflict."New value: +"Optional session ID (#108). Routes the capture to the named session, which has its own recorder — concurrent captures across sessions are safe (#180)."
  2. Changed1 schema field changedv4.0.0
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Optional session ID (#108). Routes page reference to the named session. Note: AudioCaptureService is currently server-wide — concurrent captures across sessions will conflict.",
      +  "type": "string"
      +}
  3. Addedv2.2.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose that only note(), n(), and chord() calls are parsed, which is a real behavioral constraint (other event types may not be exported), but it omits failure behavior with no loaded pattern, where a 'file' output is written, and how sessions affect the capture despite a session_id parameter.

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 short sentences with the action front-loaded and no filler. Every clause carries information; nothing needs trimming.

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?

For a simple export tool with a fully documented schema this is close to adequate, but with no annotations and no output schema the description should at least say what 'current pattern' means when multiple sessions exist and what a 'file' export produces. As written it leaves those operational questions unanswered.

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?

Schema description coverage is 100% with five documented parameters, so the schema already explains bpm defaults, the file/base64 enum, duration in bars, filename, and session routing. The description adds nothing about any parameter, so baseline 3 applies — not the zero-parameter baseline of 4, since five parameters exist.

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?

States a specific verb+resource ('Export current pattern to MIDI file') and adds what it parses (note(), n(), chord()), which tells an agent what content is captured. It never names or distinguishes itself from the closest siblings (import_midi, export_audio), so sibling differentiation is left to inference.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no mention of the obvious alternatives (import_midi for the reverse direction, export_audio for non-MIDI output). Usage is only implied by the 'current pattern' scoping phrase.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.