Skip to main content
Glama

health

Verify PayBot MCP Server connectivity to ensure automated USDC payment infrastructure is operational for transaction processing.

Instructions

Check if the PayBot server is reachable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The health tool handler that checks if the PayBot server is reachable by making a GET request to /health endpoint
    // Tool: health
    server.tool('health', 'Check if the PayBot server is reachable', {}, async () => {
      const result = await paybotRequest('GET', '/health');
      return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] };
    });
  • src/index.ts:92-96 (registration)
    Registration of the health tool with the MCP server, including tool name, description, and handler
    // Tool: health
    server.tool('health', 'Check if the PayBot server is reachable', {}, async () => {
      const result = await paybotRequest('GET', '/health');
      return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] };
    });
  • The paybotRequest helper function used by the health tool to make authenticated HTTP requests to the PayBot API
    async function paybotRequest<T>(method: string, path: string, body?: unknown): Promise<T> {
      const response = await fetch(`${PAYBOT_BASE_URL}${path}`, {
        method,
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Bearer ${PAYBOT_API_KEY}`,
        },
        body: body ? JSON.stringify(body) : undefined,
      });
    
      if (!response.ok) {
        const errorBody = await response.text().catch(() => 'Unknown error');
        throw new Error(`PayBot API error (${response.status}): ${errorBody}`);
      }
    
      return (await response.json()) as T;
    }
Install Server

Other Tools

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/RBKunnela/paybot-mcp'

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