Skip to main content
Glama
debug.ts1.05 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; import { api } from "../api/client.js"; import { formatResponse } from "../utils/index.js"; export function registerDebugTools(server: McpServer) { // Test if MCP server is working server.tool("debug_test", "Test if MCP server is working", {}, async () => { try { // Try to make a simple API call to test connectivity const response = await api.get("/projects/list-of-boards"); const result = { status: "success", message: "MCP server is working correctly", api_status: "connected", timestamp: new Date().toISOString(), boards_count: response.data.boards ? response.data.boards.length : 0, }; return formatResponse(result); } catch (error: any) { const result = { status: "error", message: "MCP server test failed", error: error.message, timestamp: new Date().toISOString(), }; return formatResponse(result); } }); }

Implementation Reference

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/danieliser/fluent-boards-mcp-server'

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