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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
typeYes
_metaNo
annotationsNo

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.")
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It correctly indicates this is a read operation ('Check') but doesn't specify what the health check entails (e.g., response time, uptime, specific endpoints), whether it requires authentication, rate limits, or what constitutes 'healthy' status. The description provides basic behavioral context but lacks operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence that states the tool's purpose without any unnecessary words. It's front-loaded with the core action and resource, making it immediately understandable. Every word earns its place, and there's no redundancy or structural issues.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (zero parameters, health check operation) and the presence of an output schema, the description is reasonably complete. It states what the tool does at a high level, though it could benefit from slightly more detail about what 'health status' includes. The output schema will handle return value documentation, so the description doesn't need to cover that aspect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't mention parameters since none exist, and it doesn't need to compensate for any schema gaps. The description focuses correctly on the tool's purpose rather than parameter details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Check') and resource ('health status of the MusicMCP.AI API service'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like check_credit_balance, but the specific focus on API health provides inherent distinction. The description avoids tautology by specifying what is being checked beyond just the tool name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (monitoring API health) but doesn't provide explicit guidance on when to use this tool versus alternatives like check_credit_balance or the song generation tools. No when-not-to-use scenarios or prerequisites are mentioned. The implied context is reasonable but lacks explicit comparison or exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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