Skip to main content
Glama

check_api_health

Verify the operational status of the MusicMCP.AI API to ensure it can generate music from natural language commands and download songs.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'check_api_health' tool, decorated with @mcp.tool for automatic registration. It performs a GET request to the /health endpoint of the MusicMCP.AI API and returns a TextContent object indicating the service 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 @mcp.tool decorator registers the check_api_health function as an MCP tool with its description.
    @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