Skip to main content
Glama
miyaichi

OpenSincera MCP Server

by miyaichi

health_check

Monitor the health status of the OpenSincera API connection to ensure operational reliability and access to publisher metadata and metrics.

Instructions

Check the health status of the OpenSincera API connection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the healthCheck functionality. Performs a test GET request to the OpenSincera API and determines health based on response status (<500 indicates healthy). Handles network errors specifically.
    async healthCheck(): Promise<boolean> { try { const response = await this.client.get('/publishers?domain=test.invalid', { timeout: 5000, }); return response.status < 500; } catch (error) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; if ( axios.isAxiosError(error) && (error.code === 'ENOTFOUND' || error.code === 'ECONNREFUSED') ) { console.error('OpenSincera API not reachable', { error: errorMessage, baseUrl: this.config.baseUrl, }); return false; } console.error('OpenSincera API health check encountered error but API appears reachable', { error: errorMessage, baseUrl: this.config.baseUrl, }); return true; } }
  • MCP tool call handler for 'health_check'. Invokes the OpenSinceraService healthCheck method and formats the boolean result as JSON with timestamp for the tool response.
    case 'health_check': { const result = await openSinceraService.healthCheck(); return { content: [ { type: 'text', text: JSON.stringify({ healthy: result, timestamp: new Date().toISOString() }, null, 2), }, ], }; }
  • src/index.ts:125-134 (registration)
    Registration of the 'health_check' tool in the ListTools response, including its name, description, and schema (no input parameters required).
    { name: 'health_check', description: 'Check the health status of the OpenSincera API connection', inputSchema: { type: 'object', properties: {}, additionalProperties: false, }, }, ] as Tool[],
  • Input schema for the health_check tool: empty object (no parameters).
    inputSchema: { type: 'object', properties: {}, additionalProperties: false, },

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/miyaichi/opensincera-mcp-server'

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