Skip to main content
Glama

project_write

DestructiveIdempotent

Generates an FL Studio project file from a project document, replacing any file at the given path. Optionally opens it in FL Studio for playback.

Instructions

Write a project document to an .flp file, replacing any file at path. This is how a piece gets made.

The document: the compact form project_read returns, or its full form. The field reference is README.md, 'Project JSON, compact form'; examples/README.md has a working document per feature. Read one before a first write.

Sounds:

  • an instrument is a plugin by name (see plugins) with an optional preset, or a channel copied from a saved project, state {from: file, channel: n};

  • an effect is mixer.effects {track, slot, plugin} or one copied, {track, slot, from: {file, track, slot}}.

Units that are easy to get wrong: 96 ticks per beat, 4/4; keys like 'D#4' with MIDI 60 = C4; mixer volume 0.8 = 0 dB; a tempo automation value is (bpm - 60) / 120.

Without open, FL need not run. With open or play, FL first saves the project it has open (so no dialog appears), then opens this one.

Returns the file read back (channels, notes per pattern, clips per arrangement) and the writer's warnings; read them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docYesthe project document, compact or full
openNoopen it in FL afterwards, launching FL if needed
pathYesthe .flp to write, absolute or relative to the repo; pieces go to projects/music/<piece>.flp
playNo'song' or 'pattern': open it and start playback

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.2.1
    • addedInput schema / properties / doc / description
      Added value: +"the project document, compact or full"
    • addedInput schema / properties / open / description
      Added value: +"open it in FL afterwards, launching FL if needed"
    • addedInput schema / properties / path / description
      Added value: +"the .flp to write, absolute or relative to the repo; pieces go to projects/music/<piece>.flp"
    • addedInput schema / properties / play / description
      Added value: +"'song' or 'pattern': open it and start playback"
  2. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive=true and idempotent=true, but the description adds real behavioral context beyond them: the file at path is overwritten, FL may be launched, and with open/play FL first saves the currently-open project so no dialog appears. It also discloses that warnings are returned, which no annotation covers.

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?

Front-loaded with purpose and the overwrite warning, then organized into document, sounds, units, and runtime sections. It is long, but nearly every line carries actionable detail, so it stays efficient rather than padded.

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

Completeness5/5

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

With no output schema present, the description compensates by stating the return shape (channels, notes per pattern, clips per arrangement, plus writer's warnings) and advising the agent to read them. Combined with the units and sound-definition guidance, an agent has everything needed to call it correctly.

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?

Schema coverage is 100%, so the baseline is 3, but the description goes further by defining what 'doc' accepts (compact or full form), citing field references, and supplying hard domain units (96 ticks/beat, MIDI 60 = C4, 0.8 = 0 dB, tempo = (bpm-60)/120) that the schema does not encode.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Write a project document to an .flp file') plus the critical side effect ('replacing any file at path'), and clarifies it is the counterpart to project_read by describing the document it consumes. An agent can immediately distinguish it from project_read and the fl_* execution tools.

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

Usage Guidelines4/5

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

Gives concrete context: read a working example before the first write, and explains the runtime condition ('Without open, FL need not run'). It does not explicitly name project_read or other sibling tools as alternatives, so it stops just short of full when-to-use/when-not coverage.

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