Skip to main content
Glama

check_api_health

Verify the operational status of the MusicMCP.AI API to ensure music generation services are available and functioning correctly.

Instructions

Check the health status of the MusicMCP.AI API service.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The @mcp.tool decorator registers the 'check_api_health' tool and defines its handler function, which performs a GET request to the /health endpoint of the MusicMCP.AI API and returns a TextContent with the health status.
    @mcp.tool(description="Check the health status of the MusicMCP.AI API service.") async def check_api_health() -> TextContent: """Check API service health status""" try: url = f"{api_url}/health" async with httpx.AsyncClient(timeout=httpx.Timeout(10.0)) as client: response = await client.get(url) response.raise_for_status() result = response.json() # API response format: {success, message, data} if result and result.get("success"): return TextContent(type="text", text="✅ MusicMCP.AI API service is healthy and operational.") else: return TextContent(type="text", text="⚠️ MusicMCP.AI API service health check failed.") except Exception as e: return TextContent(type="text", text=f"❌ Failed to check API health: {str(e)}")
  • The registration of the check_api_health tool via the FastMCP @mcp.tool decorator, which uses the function name as the tool name.
    @mcp.tool(description="Check the health status of the MusicMCP.AI API service.")

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/amCharlie/aimusic-mcp-tool'

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