Skip to main content
Glama
therealsachin

Langfuse MCP Server

get_health_status

Check system health and availability status to monitor operational reliability and service uptime.

Instructions

Get system health status and availability information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary handler function that executes the tool logic: fetches health status from Langfuse client, formats as JSON text response or error message.
    export async function getHealthStatus(
      client: LangfuseAnalyticsClient,
      args: GetHealthStatusArgs
    ) {
      try {
        const healthData = await client.getHealthStatus();
    
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify(healthData, null, 2),
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          content: [
            {
              type: 'text' as const,
              text: `Error getting health status: ${errorMessage}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Zod schema for input validation (empty parameters) and inferred TypeScript type.
    export const getHealthStatusSchema = z.object({
      // No parameters needed for health check
    });
    
    export type GetHealthStatusArgs = z.infer<typeof getHealthStatusSchema>;
  • src/index.ts:540-547 (registration)
    Tool registration in the ListTools handler, defining name, description, and input schema.
    {
      name: 'get_health_status',
      description: 'Get system health status and availability information.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:1067-1070 (registration)
    Dispatch handler in CallToolRequestSchema switch that validates arguments and invokes the tool handler.
    case 'get_health_status': {
      const args = getHealthStatusSchema.parse(request.params.arguments);
      return await getHealthStatus(this.client, args);
    }
  • LangfuseAnalyticsClient helper method that performs the HTTP GET request to the Langfuse /api/public/health endpoint.
    async getHealthStatus(): Promise<any> {
      const response = await fetch(`${this.config.baseUrl}/api/public/health`, {
        method: 'GET',
      });
    
      if (!response.ok) {
        await this.handleApiError(response, 'Health Check');
      }
    
      return await response.json();
    }
Behavior2/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 states it 'gets' information, implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, returns real-time vs. cached data, or details the response format. This is a significant gap for a tool with zero annotation coverage.

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, efficient sentence that directly states the tool's purpose without any wasted words. It's front-loaded and appropriately sized for a simple tool with no parameters.

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

Completeness3/5

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

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks behavioral details and usage context, making it incomplete for optimal agent guidance despite the simple structure.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate, earning a baseline score of 4 as it doesn't need to compensate for any gaps.

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 ('Get') and resource ('system health status and availability information'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_metrics' or 'get_daily_metrics', which might also provide health-related data, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_metrics' or other sibling tools. It lacks explicit context, exclusions, or prerequisites, leaving the agent to infer usage based on the name alone.

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/therealsachin/langfuse-mcp'

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