Skip to main content
Glama

Write piano-roll notes

fl_write_piano_roll_notes
Destructive

Write MIDI notes into the currently open FL Studio Piano roll with pitch, start bar, length, velocity, optional portamento, and grid quantization; replace or append to the pattern.

Instructions

Write notes into the currently-open FL Piano roll.

Each note: {pitch (MIDI), time_bars, length_bars, velocity 0-1, porta (optional, slide into the note)}. Set quantize (grid in bars) to snap note starts to a grid before writing. Setup: open the Piano roll and run 'MCP_Apply' once from its Scripting menu (so Run last script again targets it). mode='replace' clears first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "notes": "<notes>"
    },
    "name": "fl_write_piano_roll_notes"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo'replace' clears the pattern first; 'append' adds to it.replace
notesYes
quantizeNoOptional grid (bars) to snap note starts to before writing: 0.0625=1/16, 0.125=1/8, 0=off.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.0
    • addedInput schema / properties / notes / items / properties / porta
      Added value: +{
      +  "default": false,
      +  "description": "Native FL instrument portamento flag; inverts the channel's global portamento state for this note. No effect on VST instruments.",
      +  "type": "boolean"
      +}
  2. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Beyond annotations, the description adds useful operational context: the target is the currently-open Piano roll, setup requires running 'MCP_Apply' once, quantize snaps note starts before writing, and mode='replace' clears first. It is consistent with destructiveHint=true and does not contradict the annotation profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loads the core action before note details, quantize behavior, setup, and replace semantics. A few details overlap with the schema, but there is little wasted prose.

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

Completeness4/5

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

The description covers the essential context for a destructive write into the active Piano roll, including setup and replace behavior. With annotations and an output schema present, the remaining gaps are minor.

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 schema already documents pitch, time_bars, length_bars, velocity, porta, quantize, and mode in detail. The description summarizes the note shape and quantize behavior but mostly repeats schema content rather than adding substantial new parameter meaning.

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 a specific verb and resource: writing notes into the currently-open FL Piano roll. It does not explicitly differentiate itself from sibling writers such as fl_write_raga_chords or fl_write_raga_melody, so it falls short of the top score.

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

Usage Guidelines3/5

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

The description supplies an important prerequisite: open the Piano roll and run 'MCP_Apply' once from its Scripting menu. It also explains that mode='replace' clears first, but it does not explicitly say when to use this tool versus the raga/chord/melody writer siblings.

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

Deploy Server

Other Tools