Skip to main content
Glama
MuseScore MCP Server

MuseScore MCP Server

by ghchen99

Set Song Structure

set_song_structure

Prints a song structure table on a new page at the end of a score, listing each section's bars, groove, fills, and total, and replaces any existing structure page.

Instructions

Print the song structure as a table on a new page at the end of the score, after the end notes: the song and artist under the heading (taken from the title frame unless given), then one row per section with its bars (as played), groove and fills, and the total. Get the rows from song_structure and give grooves and fills musical names. Replaces a structure page added before; no rows removes it. Edits the score file and reloads it (undo with restore_backup).

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": {
      "rows": "<rows>"
    },
    "name": "set_song_structure"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsYesOne per section: {"section": "Verse 1", "bars": 16, "groove": "Verse shuffle", "fill": "Tom fill into chorus"}
songNoSong name under the heading. Defaults to the title in the title frame.
artistNoArtist next to the song name. Defaults to the composer in the title frame.
headingNoPage headingSong structure
score_pathNoPath of the score file. Defaults to the file of the score open in MuseScore.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that this mutates the score file, reloads it, and destructively overwrites any prior structure page, plus names the undo path. It does not say what the call returns or whether failure leaves the score modified, which matters given no output schema.

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 purpose is front-loaded in the first clause and every sentence adds a fact (data source, replacement semantics, undo). The colon-chained layout is dense and a bulleted breakdown of page contents would read faster, but there is no filler.

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 a five-parameter mutating tool with no output schema, the definition covers the data flow, layout expectations, replacement behavior, side effects, and undo. Only the return value and error behavior remain unstated, which is a minor gap for a write-and-reload operation.

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 adds real meaning: bars are 'as played', grooves and fills should carry musical names, and song/artist fall back to the title frame's title and composer. It reinforces the heading/row layout rather than merely restating field names.

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 description states a specific verb and resource ('Print the song structure as a table on a new page at the end of the score') and distinguishes it from the sibling song_structure by naming the latter as the data source for rows. An agent can tell this is a renderer/writer, not a reader, without opening the 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 gives clear operational routing: obtain the rows from song_structure, and undo with restore_backup. It also explains the replace/remove condition ('Replaces a structure page added before; no rows removes it'). What's missing is any explicit statement of when an agent should prefer this over other page/annotation tools like set_end_notes, though the application context is evident.

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