theory_respell
Suggest the preferred enharmonic spelling for one or more pitches in a given key context. Picks the spelling that is diatonic to the key (e.g. F# in G major, Gb in F major). Uses the key's accidental preference (sharps/flats) as a tiebreaker for chromatic passing tones. WHEN TO USE: after OMR (op...
This record as markdown: /tools/com-gradusmusic-notation/theory-respell.md
What theory_respell does on Gradus Notation
AI agents call theory_respell 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 |
|---|---|---|---|
pitch | string | — | Single pitch string (scientific notation). Use this OR `pitches`. |
pitches | array | — | Array of pitch strings. Use this OR `pitch`. |
keyContext | string | Yes | Key signature string, e.g. "C major", "G major", "Bb minor", "F# major". |
Parameters from the server's own tool schema.
Why theory_respell is rated Low
This tool purely analyzes and returns spelling suggestions for pitches — it reads/computes information without modifying, executing, or deleting any data. It is a stateless advisory/query operation.
From the tool's definition Suggest the preferred enharmonic spelling for one or more pitches in a given key context
Attacks that exploit this kind of access
The rule that runs theory_respell 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 theory_respell, this is the rule to start with:
theory_respell 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 theory_respell call is checked against it from then on.
Questions about theory_respell
Suggest the preferred enharmonic spelling for one or more pitches in a given key context. Picks the spelling that is diatonic to the key (e.g. F# in G major, Gb in F major). Uses the key's accidental preference (sharps/flats) as a tiebreaker for chromatic passing tones. WHEN TO USE: after OMR (optical music recognition) to correct mis-spelled accidentals; when generating notation and unsure whether to write F# or Gb; when transposing — respell after the semitone shift to maintain diatonic spelling; before calling notation_render to clean up accidentals. INPUT: { keyContext: string, pitches: string[] } OR { keyContext: string, pitch: string }. Pitch strings use scientific notation: "F#4", "Bb3", "C5", "Eb4". OUTPUT: { ok, requestId, keyContext, results: [{ input, output, changed }], attribution }. changed is true when the spelling was adjusted. EXAMPLES: { keyContext: "F major", pitches: ["F#4", "Bb4", "E4"] } → F#4→Gb4 (Gb is diatonic in F major), Bb4 unchanged, E4 unchanged. { keyContext: "G major", pitch: "Gb4" } → Gb4→F#4 (F# is diatonic in G major). It is categorised as a Read tool in the Gradus Notation MCP Server, which means it retrieves data without modifying state.
theory_respell accepts 3 parameters: pitch, pitches, keyContext. Required: keyContext. 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 theory_respell: 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.
theory_respell 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 theory_respell 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 theory_respell. 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.
theory_respell 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