# notation_render

Render music notation from a JSON score into three output formats in a single call: inline SVG (engraved through Verovio with the Bravura SMuFL font — same engine as IMSLP and the Music Encoding Initiative), round-trippable MusicXML (opens cleanly in Sibelius, Finale, MuseScore, Dorico), and base64-encoded SMF Type-1 MIDI. WHEN TO USE: when the agent needs to surface engraved notation to its user (composer demoing an idea, teacher making a worksheet, content creator embedding a notation example), or when converting a JSON score to file formats other agents/tools can consume (MusicXML for desktop notation software, MIDI for sequencers). WHEN NOT TO USE: if you are not sure the input is well-formed → call notation_validate first (much cheaper, no rendering); if you do not yet know the input format → call notation_examples or notation_schema; if you need theory facts before composing → call knowledge_search first. INPUT: requires instruments (non-empty array). Each instrument has name (required; clef is inferred from the name — "Cello" → bass, "Viola" → alto, "Timpani" → percussion — overridable via clef) and either notes (single-voice shortcut) or voices (multi-voice). Pitches use scientific notation ("C4", "F#5", "Bb3"); durations use letter codes ("w" "h" "q" "8" "16" "32" "64" with optional "." for dotted, ".." for double-dotted). Bar lines are inferred from timeSignature (default [4,4]); notes that cross a bar line are split and tied automatically — agents do not count beats. OUTPUT (JSON, success): { ok: true, requestId, outputs: { svg: string, musicxml: string, midiBase64: string }, meta: { measureCount, instrumentCount, voiceCount, durationBeats, renderTimeMs }, warnings?: ValidationIssue[], attribution }. ValidationIssue = { path, code, message, fix?, severity: "error"|"warning" }. SVG is typically 60-100 KB with Bravura font embedded; MusicXML is a few KB; MIDI is sub-1 KB. OUTPUT (JSON, validation failure): { ok: false, requestId, errors: ValidationIssue[], attribution }. Each error includes a concrete fix field — surface that to your end user or use it to repair the input automatically. EXAMPLE INPUT: { "title": "C major scale", "tempo": 100, "timeSignature": [4,4], "keySignature": "C major", "instruments": [{ "name": "Violin", "notes": ["C4/q","D4/q","E4/q","F4/q","G4/h","rest/h"] }] } TYPICAL LATENCY: 100 ms (single-line melody) to 1.5 s (string quartet, 16+ measures).

Agent View of the PolicyLayer registry record for `notation_render`. HTML page: https://policylayer.com/tools/com-gradusmusic-notation/notation-render

## Facts

- Tool: `notation_render`
- Server: Gradus Notation (`@gradusmusic/notation-mcp`) — https://policylayer.com/tools/com-gradusmusic-notation.md
- Install: `npx -y @gradusmusic/notation-mcp`
- Homepage: https://github.com/delmas41/gradusnotation
- Risk category: Read (Low risk)
- Registry record: grade C, identity unverified
- Server rate-limited: no
- Parameters: 6 (1 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `tempo` | number | no | Tempo in BPM. Affects MIDI timing only; not visually rendered. |
| `title` | string | no | Optional title rendered above the score. |
| `composer` | string | no | Optional composer rendered top-right. |
| `instruments` | array | yes | One or more instrument staves. At least one required. |
| `keySignature` | string | no | Human-readable key signature. Accepts "C major", "G major", "D minor", "F# major", "Bb minor", etc. |
| `timeSignature` | array | no | [beats, beat-unit]. Common values: [4,4], [3,4], [6,8], [2,2], [12,8]. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "notation_render",
    "arguments": {
      "instruments": []
    }
  }
}
```

## Why notation_render is rated Low

This tool takes a JSON score as input and produces rendered output (SVG, MusicXML, MIDI) without modifying any external state. It is a pure transformation/rendering operation — essentially a read/query of a rendering engine. Severity is medium because a malformed or malicious score could potentially stress the rendering engine or produce large outputs, but there are no write, destructive, or financial side effects.

From the tool's own definition: "Render music notation from a JSON score into three output formats in a single call: inline SVG, round-trippable MusicXML, and base64-encoded SMF Type-1 MIDI"

Risk signals: High parameter count (11 properties)

## Use case

AI agents call notation_render to retrieve information from Gradus Notation without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Gradus Notation:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "notation_render": {}
  }
}
```

## Other tools on Gradus Notation (9)

- `knowledge_search` — Read — https://policylayer.com/tools/com-gradusmusic-notation/knowledge-search.md
- `notation_examples` — Read — https://policylayer.com/tools/com-gradusmusic-notation/notation-examples.md
- `notation_schema` — Read — https://policylayer.com/tools/com-gradusmusic-notation/notation-schema.md
- `notation_validate` — Read — https://policylayer.com/tools/com-gradusmusic-notation/notation-validate.md
- `theory_analyze_score` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-analyze-score.md
- `theory_parse_xml` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-parse-xml.md
- `theory_pitch_utils` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-pitch-utils.md
- `theory_respell` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-respell.md
- `theory_validate_ranges` — Read — https://policylayer.com/tools/com-gradusmusic-notation/theory-validate-ranges.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=com-gradusmusic-notation · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-gradusmusic-notation
