Skip to main content
Glama
wspringer

lilypond-mcp

engrave_code

Convert inline LilyPond code into music notation images for quick visual iteration on musical ideas without creating source files.

Instructions

Engrave LilyPond code passed inline, without needing a source file on disk. Useful for iterating on a musical idea: engrave, read the preview PNG, adjust, repeat. For anything worth keeping, write a .ly file and use engrave_file instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesLilyPond source code, e.g. '\version "2.26.0" { c\' e\' g\' }'
cropNoCrop assets to the music itself (required for EPS)
nameNoBasename for the generated assetssnippet
formatsNoAsset formats to generate; png is handy while iterating on a snippet
previewNoAttach the preview PNG to the result as an image, so the engraving is visible inline without reading a file. Turn off for batch runs.
output_dirNoDirectory the generated assets are written to (created if missing)build
include_dirsNoDirectories searched by \include, e.g. a shared settings library

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorsNo
outputsYes
previewPngNoCropped PNG of the engraved music — read this file to inspect the result

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.2.1
    • addedInput schema / properties / preview
      Added value: +{
      +  "default": true,
      +  "description": "Attach the preview PNG to the result as an image, so the engraving is visible inline without reading a file. Turn off for batch runs.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the behavioral disclosure burden. It does add useful context about inline code, the preview PNG iteration loop, and the throwaway nature of snippets. However, it does not disclose side effects such as writing generated assets to output_dir or behavior on invalid LilyPond input, leaving part of the behavioral picture to the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, each earning its place: the core action, the intended iteration workflow, and the recommended alternative for durable work. It is front-loaded and free of filler.

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 7-parameter tool with a fully described schema and an output schema, the description covers the key selection criterion (inline vs file-based) and the intended workflow. It omits side-effect details, but the parameter descriptions fill most invocation gaps, making the overall definition adequate for correct use.

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 baseline is 3. The description reinforces the purpose of the code parameter ('passed inline') and preview PNG behavior, but it does not add meaningful semantics for crop, formats, include_dirs, or other parameters beyond what the schema already states.

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?

The description opens with a specific verb and resource: 'Engrave LilyPond code passed inline, without needing a source file on disk.' This explicitly distinguishes the tool from its sibling engrave_file, which works from a .ly file. An agent can immediately understand what this tool does and how it differs.

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?

The description gives explicit when-to-use guidance ('Useful for iterating on a musical idea') and an explicit alternative: 'For anything worth keeping, write a .ly file and use engrave_file instead.' This is direct, actionable routing between siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wspringer/lilypond-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server