Skip to main content
Glama

get status

Check the operational status of the TabNews API to verify service availability and connectivity.

Instructions

get status from tabnews api

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get status' tool. It fetches the API status using getApiStatus(), formats it as JSON text, and returns it wrapped in an McpResponse.
    handler: async (): Promise<McpResponse> => { try { const result = await getApiStatus(); const content: McpTextContent = { type: "text", text: `API Status:\n\n${JSON.stringify(result, null, 2)}`, }; return { content: [content], }; } catch (error) { if (error instanceof Error) { throw new Error(`Failed to check API status: ${error.message}`); } else { throw new Error("Failed to check API status"); } } },
  • src/index.ts:24-29 (registration)
    Registration of the 'get status' tool (checkStatusTool) with the MCP server using server.tool().
    server.tool( checkStatusTool.name, checkStatusTool.description, checkStatusTool.parameters, checkStatusTool.handler );
  • Helper function getApiStatus() that fetches the status from the TabNews API endpoint /status.
    export async function getApiStatus(): Promise<GetStatusResponse> { const response = await fetch(`${TABNEWS_API_URL}/status`); const data = await response.json(); return data as GetStatusResponse; }
  • Type definition for the GetStatusResponse returned by the API status endpoint, used in the tool handler.
    export interface GetStatusResponse { updated_at: string; dependencies: Dependencies; }
  • MCP response type used by the tool handler to structure the output.
    export interface McpResponse { content: McpContent[]; _meta?: Record<string, unknown>; isError?: boolean; [key: string]: unknown; }

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/renant/mcp-tabnews'

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