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
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | Message to echo back |
Implementation Reference
- src/tools/handlers.ts:160-177 (handler)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( - src/types.ts:49-51 (schema)Input schema definition for the "ping" tool.
export const PingToolSchema = z.object({ message: z.string().optional(), }); - src/tools/handlers.ts:258-258 (registration)Registration of the PingToolHandler in the tools registry.
[TOOLS.PING]: new PingToolHandler(), - src/tools/definitions.ts:17-19 (helper)Definition of the ping tool for the MCP server.
name: 'ping', description: 'Test MCP server connection', arguments: [