Tools Overview
encoding-music-mcp provides a suite of tools for analyzing MEI files. All tools work with the built-in MEI collection.
Available Tools
Discovery Tools
| Tool | Purpose | Learn More |
|---|---|---|
list_available_mei_files |
Browse and discover the 46 built-in MEI files | Documentation |
Metadata Tools
| Tool | Purpose | Learn More |
|---|---|---|
get_mei_metadata |
Extract title, composer, editors, dates, and copyright info | Documentation |
Analysis Tools
| Tool | Purpose | Learn More |
|---|---|---|
analyze_key |
Detect musical key with confidence scores | Documentation |
get_notes |
Extract all notes with pitch and octave information | Documentation |
get_melodic_intervals |
Analyze melodic intervals within voices | Documentation |
get_harmonic_intervals |
Analyze harmonic intervals between voices | Documentation |
get_melodic_ngrams |
Find recurring melodic patterns | Documentation |
Tool Categories
π Discovery
Tools for exploring the MEI collection:
- list_available_mei_files: Browse files by composer
π Metadata
Tools for extracting descriptive information:
- get_mei_metadata: Get complete metadata from MEI headers
π΅ Musical Analysis
Tools for analyzing musical content:
- analyze_key: Key detection using music21
- Interval Analysis: Comprehensive interval analysis using CRIM Intervals
- Notes extraction
- Melodic intervals
- Harmonic intervals
- N-gram pattern matching
Tool Design Philosophy
All tools in encoding-music-mcp follow these principles:
1. Direct File Access
Tools read directly from disk with no intermediate caching, ensuring:
- β‘ Fast response times
- πΎ Minimal memory usage
- π Always up-to-date results
2. Structured Output
All tools return structured dictionaries with consistent keys:
{
"filename": "Bach_BWV_0772.mei", # Always included
"key_name": "...", # Tool-specific data
# ...
}
3. Error Handling
Tools provide clear error messages when files don't exist or can't be processed:
4. Dataframe Format
Analysis tools return data in readable tabular format:
- Rows: Measure and beat positions
- Columns: Voice parts or analysis dimensions
- Values: Musical data (notes, intervals, patterns)
Common Parameters
Most tools accept a filename parameter:
Analysis tools may accept additional parameters:
Using Tools with AI Assistants
Natural Language Queries
Simply ask your AI assistant in natural language:
- "What MEI files are available?"
- "Analyze the key of Bach_BWV_0772.mei"
- "Get melodic 5-grams from Bartok_Mikrokosmos_022.mei"
Direct Tool Invocation
MCP clients can also invoke tools directly:
Next Steps
- Browse specific tool documentation using the navigation menu
- Try the Quick Start guide for examples
- Explore the MEI Resources available for analysis