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 base...
This record as markdown: /tools/com-gradusmusic-notation/notation-render.md
What notation_render does on Gradus Notation
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
tempo | number | — | Tempo in BPM. Affects MIDI timing only; not visually rendered. |
title | string | — | Optional title rendered above the score. |
composer | string | — | Optional composer rendered top-right. |
instruments | array | Yes | One or more instrument staves. At least one required. |
keySignature | string | — | Human-readable key signature. Accepts "C major", "G major", "D minor", "F# major", "Bb minor", etc. |
timeSignature | array | — | [beats, beat-unit]. Common values: [4,4], [3,4], [6,8], [2,2], [12,8]. |
Parameters from the server's own tool schema.
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 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 signalsHigh parameter count (11 properties)
Attacks that exploit this kind of access
The rule that runs notation_render safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Gradus Notation, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For notation_render, this is the rule to start with:
notation_render is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Gradus Notation, apply this rule, and every notation_render call is checked against it from then on.
Questions about 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). It is categorised as a Read tool in the Gradus Notation MCP Server, which means it retrieves data without modifying state.
notation_render accepts 6 parameters: tempo, title, composer, instruments, keySignature, timeSignature. Required: instruments. The full parameter table on this page comes from the server's own tool schema.
Register the Gradus Notation MCP server in PolicyLayer and add a rule for notation_render: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Gradus Notation. Nothing to install.
notation_render is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the notation_render rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for notation_render. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
notation_render is provided by the Gradus Notation MCP server (@gradusmusic/notation-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Gradus Notation, and thousands of servers like it.
This server
Across the catalogue