theory_parse_xml
Parse a MusicXML string into a maestroAnalyst Score object. The Score is the input type for theory_validate_ranges and can be passed to any maestroAnalyst analysis function. WHEN TO USE: when you have a MusicXML file (e.g., exported from Sibelius, Finale, MuseScore, Dorico, or produced by notatio...
This record as markdown: /tools/com-gradusmusic-notation/theory-parse-xml.md
What theory_parse_xml does on Gradus Notation
AI agents call theory_parse_xml 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 |
|---|---|---|---|
xml | string | Yes | Raw MusicXML document string (score-partwise format). Must begin with <?xml or <score-partwise. |
Parameters from the server's own tool schema.
Why theory_parse_xml is rated Low
This tool ingests a MusicXML string and converts it into an in-memory Score object for subsequent analysis. It performs no writes, deletions, code execution, or financial operations — it is a pure parsing/deserialization step that reads input data and produces a structured representation. Misuse potential is minimal; the worst case is processing malformed XML.
From the tool's definition Parse a MusicXML string into a maestroAnalyst Score object
Attacks that exploit this kind of access
The rule that runs theory_parse_xml 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_parse_xml, this is the rule to start with:
theory_parse_xml 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_parse_xml call is checked against it from then on.
Questions about theory_parse_xml
Parse a MusicXML string into a maestroAnalyst Score object. The Score is the input type for theory_validate_ranges and can be passed to any maestroAnalyst analysis function. WHEN TO USE: when you have a MusicXML file (e.g., exported from Sibelius, Finale, MuseScore, Dorico, or produced by notation_render) and want to analyse it — detect key, check ranges, respell accidentals. This is the entry point for the native analysis pipeline that replaces music21. LIMITATIONS: accepts plain MusicXML text (score-partwise format). Does NOT accept .mxl ZIP archives — decompress first if needed. Score-timewise and other non-partwise formats are not supported. INPUT: { xml: string } — the full MusicXML document text. OUTPUT: { ok, requestId, score: Score, meta: { partCount, noteCount, measureCount }, attribution }. The Score JSON can then be passed to theory_validate_ranges or any other theory tool. TYPICAL SIZE: a Bach chorale (4 parts, 32 measures) produces a Score with ~512 notes. A Beethoven symphony movement (12 parts, 400 measures) may produce 8,000+ notes. Fit within your context budget or process in chunks. It is categorised as a Read tool in the Gradus Notation MCP Server, which means it retrieves data without modifying state.
theory_parse_xml accepts 1 parameter: xml. Required: xml. 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_parse_xml: 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_parse_xml 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_parse_xml 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_parse_xml. 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_parse_xml 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