Skip to main content
Glama

Add region

score.add_region
Idempotent

Place a stretch of music on a part: a notes region (empty for score.add_notes, or with notes passed now) or an audio region (media, or a source range of it: a loop, a recording, a stem). at_beats and length_beats place it (or at_seconds and length_seconds). Audio keeps its own speed unless fit_beats is given, which stretches it to that many beats without changing its pitch. Regions on one part may overlap and sound together. Returns the new score_id (edit that one next), the region_id, and where it sits in beats, seconds and frames.

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": {
      "part_id": "<part_id>",
      "score_id": "<score_id>"
    },
    "name": "score.add_region"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoNotes to put in it now, as in score.add_notes
sourceNo{from_seconds, until_seconds} of the media. Default all of it
gain_dbNoLevel of an audio region. Default 0
part_idYesThe part
at_beatsNoWhere it starts. One of at_beats or at_seconds
media_idNoAudio media, for an audio region
score_idYesThe score to edit
fit_beatsNoStretch the audio to this many beats, pitch unchanged
at_secondsNoWhere it starts, in seconds
length_beatsNoIts length (or length_seconds). Required for a notes region; default for audio is the source's length
length_secondsNo

Output Schema

NameRequiredDescriptionDefault
parentYesThe version this edit started from
regionYes
changedYesWhat the edit added, removed or modified
note_idsNoNotes passed with it, in the order given
score_idYesThe new version: edit this one next (older ids stay valid)
warningsYes
region_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent, non-destructive, so the description correctly adds semantics beyond them: audio retains its own speed unless fit_beats stretches it without pitch change, and regions on one part may overlap and sound together. It also discloses what is returned (score_id, region_id, position in beats/seconds/frames). Minor gap: gain_db and general permission/authoring constraints are not discussed.

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?

Dense but front-loaded: the core action and the two region types come first, then placement, then the fit_beats caveat, then behavior and returns. No filler sentences, though the parenthetical-heavy style and the ambiguous aside 'Returns the new score_id (edit that one next)' slightly muddy an otherwise efficient block.

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?

For an 11-parameter tool with nested objects and 91% schema coverage, the description covers the decisions an agent must make: notes vs. audio, which unit family to use, how audio length is inferred, what fit_beats does, and how overlapping regions behave. The presence of an output schema means return details need not be spelled out, and remaining omissions (gain_db levels, source range defaults) 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?

Schema coverage is 91%, so the schema does most of the work and the baseline of 3 applies. The description does add real meaning beyond it — the at_beats/length_beats pairing versus the at_seconds/length_seconds alternative, and the crucial rule that length_beats is required for a notes region but defaults to the source length for audio — which lifts it just above baseline but not to a full 4 given how thoroughly the schema already documents parameters.

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?

The opening sentence gives a specific verb and resource ('Place a stretch of music on a part') and immediately splits the tool into its two concrete modes — notes region vs. audio region. It names score.add_notes as the sibling that produces an empty notes region, so an agent can place this tool relative to it without opening any schema.

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?

It distinguishes the two usage paths clearly ('empty for score.add_notes, or with notes passed now' versus 'media, or a source range of it: a loop, a recording, a stem') and points at score.add_notes as the related tool. It stops short of explicit when-not-to-use or 'prefer X instead' routing for the many other region siblings (split/trim/move), so it is strong context but not full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.