Skip to main content
Glama

ping

Test connectivity to the Codex MCP Server by sending a message and receiving an echo response to verify the server is operational.

Instructions

Test MCP server connection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNoMessage to echo back

Implementation Reference

  • The handler implementation for the "ping" tool.
    export class PingToolHandler {
      async execute(args: unknown): Promise<ToolResult> {
        try {
          const { message = 'pong' }: PingToolArgs = PingToolSchema.parse(args);
    
          return {
            content: [
              {
                type: 'text',
                text: message,
              },
            ],
          };
        } catch (error) {
          if (error instanceof ZodError) {
            throw new ValidationError(TOOLS.PING, error.message);
          }
          throw new ToolExecutionError(
  • Input schema definition for the "ping" tool.
    export const PingToolSchema = z.object({
      message: z.string().optional(),
    });
  • Registration of the PingToolHandler in the tools registry.
    [TOOLS.PING]: new PingToolHandler(),
  • Definition of the ping tool for the MCP server.
    name: 'ping',
    description: 'Test MCP server connection',
    arguments: [
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/tom-wahl/codex-mcp-server'

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