Skip to main content
Glama
cyber-band-mcp

cyber-band-mcp

by chenzy2006

write_track_notes

Write or append structured note JSON to a named MIDI track, validating musician roles and replace/append modes while returning note counts and out-of-range warnings.

Instructions

向指定轨道写入或追加结构化音符 JSON(严禁直接写入二进制 MIDI)。

Args: project_id: 目标工程 ID。 track_name: 轨道名称(drums / bass / chords / melody)。 role: 提交音符的乐手角色(Drummer / Bassist / Synth)。 notes: 音符列表,每项包含 pitch、start_beat、duration_beats、velocity。 mode: 写入模式,"replace" 全量替换,"append" 追加到现有音符后。 program: 可选 General MIDI 音色编号(0-127);drums 轨道自动忽略。

Returns: 写入结果摘要、音符数量、拍数范围与越界警告。

Raises: ValueError: 当角色与轨道分工不匹配或音符字段不合法时抛出。 KeyError: 当 project_id 不存在时抛出。

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": {
      "project_id": "<project_id>",
      "track_name": "<track_name>",
      "role": "<role>",
      "notes": "<notes>"
    },
    "name": "write_track_notes"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoreplace
roleYes
notesYes
programNo
project_idYes
track_nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/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 substantial work: it discloses that replace destroys existing notes wholesale, that program is silently ignored for drums, and it enumerates ValueError (role/track mismatch, invalid note fields) and KeyError (unknown project_id) failure modes. It does not cover permissions, concurrency/locking, or whether a replace is recoverable, which keeps it below a 5 for a destructive write.

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 sentence is front-loaded and the Args/Returns/Raises block is scannable, with every parameter line earning its place. The Returns section is largely redundant since an output schema already exists, which is the only real waste.

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 six-parameter mutation tool with zero annotation and zero schema-description coverage, the definition supplies parameters, mutation semantics, error conditions, and return shape. It is only incomplete on operational concerns (auth, concurrent writes, recoverability) that an agent might need before issuing a replace.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: all six parameters are explained, including the enum semantics of mode, the meaning of role as the submitting musician, the allowed track_name values, the GM 0-127 range and nullability of program, and the sub-fields of each notes item (pitch, start_beat, duration_beats, velocity) that the generic object schema leaves opaque.

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 pair (write/append) and resource (structured note JSON on a named track), then adds a hard exclusion: binary MIDI must never be written here. That exclusion implicitly routes the agent to export_midi, so the tool is distinguishable from its siblings 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?

Usage context is clear: mode="replace" vs "append" defines the two ways to call it, drums tracks auto-ignore program, and the binary-MIDI prohibition is a genuine when-not. It stops short of explicitly naming the alternative tool to use for binary export, so routing is inferred rather than stated.

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