Skip to main content
Glama
navigation.py1.67 kB
"""Cursor and navigation tools for MuseScore MCP.""" from ..client import MuseScoreClient def setup_navigation_tools(mcp, client: MuseScoreClient): """Setup cursor and navigation tools.""" @mcp.tool() async def get_cursor_info(): """Get information about the current cursor position.""" return await client.send_command("getCursorInfo") @mcp.tool() async def go_to_measure(measure: int): """Navigate to a specific measure.""" return await client.send_command("goToMeasure", {"measure": measure}) @mcp.tool() async def go_to_final_measure(): """Navigate to the final measure of the score.""" return await client.send_command("goToFinalMeasure") @mcp.tool() async def go_to_beginning_of_score(): """Navigate to the beginning of the score.""" return await client.send_command("goToBeginningOfScore") @mcp.tool() async def next_element(): """Move cursor to the next element.""" return await client.send_command("nextElement") @mcp.tool() async def prev_element(): """Move cursor to the previous element.""" return await client.send_command("prevElement") @mcp.tool() async def next_staff(): """Move cursor to the next staff.""" return await client.send_command("nextStaff") @mcp.tool() async def prev_staff(): """Move cursor to the previous staff.""" return await client.send_command("prevStaff") @mcp.tool() async def select_current_measure(): """Select the current measure.""" return await client.send_command("selectCurrentMeasure")

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/ghchen99/mcp-musescore'

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