Skip to main content
Glama
menu_items.py1.02 kB
from fastmcp import Context from models import MCPResponse from services.registry import mcp_for_unity_resource from services.tools import get_unity_instance_from_context from transport.unity_transport import send_with_unity_instance from transport.legacy.unity_connection import async_send_command_with_retry class GetMenuItemsResponse(MCPResponse): data: list[str] = [] @mcp_for_unity_resource( uri="mcpforunity://menu-items", name="menu_items", description="Provides a list of all menu items." ) async def get_menu_items(ctx: Context) -> GetMenuItemsResponse | MCPResponse: """Provides a list of all menu items. """ unity_instance = get_unity_instance_from_context(ctx) params = { "refresh": True, "search": "", } response = await send_with_unity_instance( async_send_command_with_retry, unity_instance, "get_menu_items", params, ) return GetMenuItemsResponse(**response) if isinstance(response, dict) else response

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/CoplayDev/unity-mcp'

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