Skip to main content
Glama
health.js855 B
import { apiClient } from "../core/apiClient.js"; export const healthTool = { name: "presearch_health_check", description: "Check connectivity to Presearch API", inputSchema: { type: "object", properties: {}, }, execute: async () => { try { // Simple ping by doing a minimal search await apiClient.get("/v1/search", { params: { q: "test", limit: 1 } }); return { content: [ { type: "text", text: JSON.stringify({ status: "healthy", api: "connected" }), }, ], }; } catch (error) { return { isError: true, content: [ { type: "text", text: JSON.stringify({ status: "unhealthy", error: error.message, }), }, ], }; } }, };

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/NosytLabs/presearch-search-api-mcp'

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