Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Check part writing, counterpoint and playability

theory_check
Read-only

Validates music against theory rules: four-part writing, species counterpoint, instrument playability and voice-leading cost, returning each violation with its voices and rationale.

Instructions

Checks music against rules: four-part writing (parallel fifths and octaves, spacing, voice crossing), species counterpoint (species 1-5 against a cantus firmus), whether a bass, guitar or drum part is playable (range, stretch, limb conflicts, difficulty), and the voice-leading cost between two voicings. Violations come back as kind, voices, from_index, to_index and a rationale. Not for naming the harmony (use theory_analyze) or for looking up facts (use theory_lookup). Example: {"check": {"kind": "partWriting", "voicings": [["C3","G3","E4"],["D3","A3","F4"]], "chords": ["C","Dm"], "key": "C major"}}.

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": {
      "check": "<check>"
    },
    "name": "theory_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
checkYesThe check, an object with a 'kind' plus its fields: partWriting {voicings, chords, key}; species {cantus_firmus, counterpoint, species, key, counterpoint_above?}; playability {source, instrument, tempo_bpm?}; voiceLeading {from_voicing, to_voicing}.
detailNo'concise' returns the summary and the most useful fields; 'full' returns all.concise

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?

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds value beyond that by disclosing the violation return shape (kind, voices, from_index, to_index, rationale) — important because there is no output schema. It does not discuss failure modes or how many violations are returned, so it stops short of a 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?

One dense paragraph front-loads the four check types, then exclusions, then return fields, then an example — a sensible priority order with little wasted wording. It is on the long side, but each clause carries information an agent needs for routing or payload construction.

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 single-parameter polymorphic tool with no output schema, the description covers the check kinds, their required fields, the return fields, and a usable example — enough to invoke it correctly. The omissions are minor: no mention of the `detail` verbosity control and no indication of whether results include a pass/fail summary alongside the violation list.

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 100%, so the discriminated-union fields are already fully documented, and the baseline of 3 applies. The worked example ({"check": {"kind": "partWriting", ...}}) does help concretize the polymorphic payload, but the top-level `detail` parameter (concise vs full) is never mentioned in the description, leaving that behavior to the schema alone.

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?

Opens with a specific verb+resource ('Checks music against rules') and then enumerates the four distinct checks it performs: part writing, species counterpoint, playability, and voice-leading cost. It explicitly separates itself from theory_analyze (harmony naming) and theory_lookup (fact lookup), so an agent can route correctly without opening schemas.

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?

Provides explicit negative routing: 'Not for naming the harmony (use theory_analyze) or for looking up facts (use theory_lookup)', naming the alternatives and the condition that selects them. The parenthetical detail under each check kind (e.g. 'species 1-5 against a cantus firmus', 'range, stretch, limb conflicts, difficulty') tells the agent which sub-check matches a given user request.

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