Skip to main content
Glama

get status

Retrieve the current status of the TabNews API using the MCP server's integration tool, enabling real-time monitoring and interaction with TabNews data.

Instructions

get status from tabnews api

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get status' tool, which fetches the API status using getApiStatus and returns it formatted as MCP text content.
    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 (imported as checkStatusTool) on the MCP server instance.
    server.tool( checkStatusTool.name, checkStatusTool.description, checkStatusTool.parameters, checkStatusTool.handler );
  • Helper function that performs the actual API call to retrieve the status from TabNews API, used by the tool handler.
    export async function getApiStatus(): Promise<GetStatusResponse> { const response = await fetch(`${TABNEWS_API_URL}/status`); const data = await response.json(); return data as GetStatusResponse; }
  • Tool schema definition including name, description, and empty parameters schema for the 'get status' tool.
    name: "get status", description: "get status from tabnews api", parameters: {},

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