Skip to main content
Glama

Set note expression

set_note_expression
DestructiveIdempotent

Set per-note expression values such as velocity, volume, or attack on selected notes in an OpenUtau part; use set_curve for expressions that change over time.

Instructions

Set a per-note expression value (velocity, volume, attack, ...) on notes of a part in OpenUtau (needs the bridge; one undo step). For a curve that changes over time (dyn, tenc, brec, ...) use set_curve instead. Fails for curve-only expressions. Returns the changed notes. / 音符ごとの表情(vel・vol・atk など)を設定します。時間で変わる カーブ(dyn など)は set_curve。

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": "<part>",
      "abbr": "<abbr>",
      "value": "<value>"
    },
    "name": "set_note_expression"
  }
}

Input Schema

NameRequiredDescriptionDefault
abbrYesNote expression: vel (velocity), vol, atk (attack), dec (decay), gen, bre, clr, ... (see get_project expressions). / 音符の表情の略称
partYesVoice part index from 0, counting voice parts only (see get_project voice_parts). / ボイスパート番号(0 から、ボイスパートのみ数える)
valueYesNew value within the expression's range; null resets to default. / 値(null で既定)
indicesNoNote indexes in the part (see list_notes). Omit for every note. / 音符番号のリスト。省略で全音符

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.5.0
    • addedInput schema / properties / abbr / description
      Added value: +"Note expression: vel (velocity), vol, atk (attack), dec (decay), gen, bre, clr, ... (see get_project expressions). / 音符の表情の略称"
    • addedInput schema / properties / indices / description
      Added value: +"Note indexes in the part (see list_notes). Omit for every note. / 音符番号のリスト。省略で全音符"
    • addedInput schema / properties / part / description
      Added value: +"Voice part index from 0, counting voice parts only (see get_project voice_parts). / ボイスパート番号(0 から、ボイスパートのみ数える)"
    • addedInput schema / properties / value / description
      Added value: +"New value within the expression's range; null resets to default. / 値(null で既定)"
  2. Changed9 schema fields changedv0.4.0
    • removedInput schema / properties / abbr / title
      Removed value: -"Abbr"
    • removedInput schema / properties / indices / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "integer"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / indices / default
      Removed value: -null
    • addedInput schema / properties / indices / items
      Added value: +{
      +  "type": "integer"
      +}
    • removedInput schema / properties / indices / title
      Removed value: -"Indices"
    • addedInput schema / properties / indices / type
      Added value: +"array"
    • removedInput schema / properties / part / title
      Removed value: -"Part"
    • removedInput schema / properties / value / title
      Removed value: -"Value"
    • removedInput schema / title
      Removed value: -"set_note_expressionArguments"
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already carry readOnlyHint=false, destructiveHint=true and idempotentHint=true, so the bar is lower; the description still adds real context beyond them: the bridge prerequisite, that changes are a single undo step, that curve-only expressions error out, and that the changed notes are returned. It does not state permissions or what happens to notes not listed in indices, keeping it below 5.

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 the core action, prerequisite and undo cost, then the alternative routing in the very next sentence, and closes with the return value. The only waste is the full Japanese restatement, which doubles length without adding new semantics for a non-localized reader.

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?

No output schema exists, so the description usefully states 'Returns the changed notes'; it also flags the external bridge dependency and the undo cost, which matter for a destructive mutation. What's missing is minor: no mention of the indices/whole-part scope, which the schema covers verbally but the description omits.

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 description coverage is 100%, so baseline is 3; both abbr and part already document indexes and examples, and value documents null-reset. The description's expression examples (velocity, volume, attack) duplicate what the schema's abbr description already says, and it never mentions the indices parameter or its omit-for-all-notes behavior.

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?

Names a specific verb and resource ('Set a per-note expression value... on notes of a part'), lists example expressions, and explicitly separates itself from the sibling set_curve. An agent can distinguish it from set_curve without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit alternative with the selecting condition ('For a curve that changes over time (dyn, tenc, brec, ...) use set_curve instead') and an explicit failure mode ('Fails for curve-only expressions'). Both when-to-use and when-not-to-use are stated, not inferred.

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