Skip to main content
Glama
musescore

musescore

by bgng-co-jp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MSCORE_BINNoPath to the mscore binary (MuseScore Studio 4.7.6)./Applications/MuseScore 4.app/Contents/MacOS/mscore
MSCORE_SANDBOXNoFolder whose child runs/<runId> is used as HOME/CFFIXED_USER_HOME for each mscore invocation, keeping it separate from the normal MuseScore settings.<repo>/.sandbox
MSCORE_MCP_WORKNoFolder for the working copies (versions) of scores and the mscore launch log (mscore-pids.log). Saving into this folder is always refused.<repo>/work
MSCORE_TIMEOUT_FACTORNoMultiplier applied to the default timeouts (info 120s, export 180s, render 300s, extension 180s). Use e.g. 2 for large scores.1
MSCORE_MCP_MAX_PARALLELNoNumber of mscore processes run concurrently within one server.1
MSCORE_MCP_READONLY_DIRSNoColon-separated list of folders where saving is refused. The working folder (MSCORE_MCP_WORK) is always refused in addition to these.~/projects/musescore-mcp/testscores
MSCORE_MCP_KEEP_FAILED_RUNSNoWhether to keep runs/<runId> (including logs) for failed invocations. 0 means do not keep. Successful runs are always removed; runs older than one day are removed at startup.1

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
score_openA

譜面ファイル(.mscz/.mscx/.musicxml/.mxl)を作業用にコピーして開き、概要(題名・パート・小節数・ページ数・段の並び)を返す。元のファイルには書き込まない。以後の操作は返った score_id で行う。

score_statusB

開いている譜面の版(番号 0=開いた直後、以降は変更ごと)と、今の版を返す。版のファイル名は使い回さないので、戻した後に変更すると番号とファイル名の数字がずれる。

score_undoA

今の版を steps だけ前に戻す(ファイルは消さない。戻した後に変更すると、その先の版は捨てる)。

score_renderA

今の版(または指定した版)のページを PNG に描いて画像で返す。dpi は 30〜200(既定 80)。一度に返すのは 4 ページまで。

layout_inspectA

段・ページごとの小節の並び、各小節の幅・伸び縮み・改段、記号(強弱・歌詞・テキスト・ヘアピン等)の位置と、重なりの候補を返す。座標は sp(譜表の1間)単位。要素の id(例 DYNAMIC#3, LYRICS#10, HAIRPIN#0.1)は element_offset に渡せる。小節は 1 始まりの通し番号(譜面の先頭からの並び順。弱起や番号を飛ばした小節があると表示上の小節番号とずれることがある。layout_inspect の measures[].index / no で対応を確認できる)

layout_set_breakA

指定した小節の終わりに区切りを入れる。kind: line=改段, page=改ページ, section=セクション区切り, nobreak=この小節の後で段を切らない, none=区切りを外す。その小節に既にある区切りは置き換える。MuseScore の API(画面なし)で行い、新しい版を作る。小節は 1 始まりの通し番号(譜面の先頭からの並び順。弱起や番号を飛ばした小節があると表示上の小節番号とずれることがある。layout_inspect の measures[].index / no で対応を確認できる)

layout_set_stretchA

小節の範囲に伸び縮み(userStretch。1=標準、1より大きいと広く、小さいと狭く)を設定する。MuseScore の描画では 0.1〜10 に収められる。小節は 1 始まりの通し番号(譜面の先頭からの並び順。弱起や番号を飛ばした小節があると表示上の小節番号とずれることがある。layout_inspect の measures[].index / no で対応を確認できる)

layout_systems_everyA

小節の範囲(既定は全体)を every 小節ずつの段にする。method=lock(既定)は MuseScore 4.6 以降の段の固定(メニューの「改段の追加/削除」と同じ。幅が足りなくても N 小節に収める)、method=breaks は N 小節ごとに改段を入れる(幅が足りないと MuseScore がそれより手前で段を切る)。範囲の中の改段・nobreak は先に外す(改ページ・セクション区切りは残して keptBreaks で返す)。小節は 1 始まりの通し番号(譜面の先頭からの並び順。弱起や番号を飛ばした小節があると表示上の小節番号とずれることがある。layout_inspect の measures[].index / no で対応を確認できる)

layout_fit_pagesA

譜面を pages ページ以内に収める。tighten=true(既定)なら、まず縦方向の自動の広げ(enableVerticalSpread)を切り、段・譜表の間隔(minSystemDistance 4 / maxSystemDistance 8 / staffDistance 5 / akkoladeDistance 5 sp、今の値がこれより小さければそのまま)を詰める。そのうえで MuseScore 自身のレイアウトで spatium(譜表の大きさ, mm)を二分探索し、収まる一番大きい値を mscore -S で焼き込んで新しい版を作る。すでに収まっていれば何もしない(max_spatium_mm を指定すると、その大きさまで広げてよい)。

style_listA

レイアウトに効くスタイルのキー(v4.7.6 の Sid)を、型・単位・既定値・説明付きで返す。既定はよく使う 60 件余り。query で名前や説明を検索すると全 1972 件から探す。

style_getB

今の版のスタイル値(score_style.mss)を読む。譜面に書かれていないキーは既定値を返す。

style_setA

スタイルのキーと値をまとめて設定する(例 {"spatium":1.5, "minSystemDistance":10})。単位: SPATIUM 型は sp、page* はインチ、spatium は mm、BOOL は true/false、POINT は {x,y}。値は型で検査する。変えるキーだけの .mss を作り mscore -S で焼き込んで新しい版を作り、変更前後のページ・段を返す。注意: enableVerticalSpread=true の間は staffDistance/akkoladeDistance/minSystemDistance が効かない。pageWidth を変えるときは pagePrintableWidth も変える。

element_offsetA

記号(強弱・歌詞・テキスト・テンポ・ヘアピンの区間など)の位置をずらす。対象は layout_inspect の要素 id(例 DYNAMIC#3、HAIRPIN#0.1)か、type+measure(+staff, nth)で指す。mode=relative(既定)は今の位置から dx,dy(sp、y は下向きが正)だけ動かす。absolute は offset そのものを x,y にする。autoplace=false にすると MuseScore が自動で押し戻さなくなる(重なっても動かさない)。

score_compareA

2 つの版(既定は 1 つ前と今)を比べ、ページ数・段数・段ごとの小節数、小節ごとの伸び縮み/改段の差、スタイルの差、ページ画像の画素の差を返す。

score_saveA

今の版を保存する(.mscz、または .pdf で書き出し)。既定では既存のファイルを上書きしない。overwrite=true のときだけ上書きし、その前に「<名前>.bak-日時ミリ秒-乱数」の控えを作る(控えは上書きしない)。書き込み禁止のフォルダ(既定は試験譜面のフォルダ)と作業フォルダには保存できない(記号リンクのフォルダ経由・大文字小文字の違いでも拒否)。保存先そのものが記号リンクのときも拒否する。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 15 tools

Disambiguation4/5

Most tools target a clearly distinct object+action pair (style_get reads values vs. style_list enumerates keys; score_status reports the current version vs. score_compare diffs two versions). The main overlap is between layout_set_break, layout_systems_every, and layout_fit_pages, which all manipulate breaks/spacing, but the descriptions explicitly differentiate them (systems_every clears existing breaks, fit_pages tunes spatium and distances). An agent could still occasionally hesitate between set_stretch and element_offset for spacing tweaks, but overall boundaries hold.

Naming Consistency4/5

Strong, predictable prefix-namespace pattern (score_*, style_*, layout_*, element_*) in consistent snake_case, with verb-ish suffixes (open, save, undo, render, compare, set, offset). Minor deviations: score_status and element_offset are noun_noun with no verb, and layout_systems_every / layout_fit_pages use unusual non-verb phrasing. Still readable and groupable at a glance.

Tool Count5/5

15 tools sits at the top of the ideal range but each maps to a concrete operation in the edit-render-save workflow (open/status/undo/compare/save plus style and layout subtools). Nothing appears redundant enough to drop, and the surface is not so large that selection becomes a burden.

Completeness4/5

Lifecycle coverage is solid: open, status, undo, compare, render, and save/export (mscz/pdf) plus full style read/list/set and layout inspection/break/stretch/system/fit/element-offset operations. Gaps are minor: no redo, no explicit close/reset of a score, no direct note or metadata editing, and no way to apply a style preset wholesale — all workable around given the layout-focused scope.