ping
Test connectivity and verify response from the Gemini CLI MCP Server by sending a message and receiving an echo.
Instructions
Echo
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | Message to echo |
Implementation Reference
- lib/fixed-mcp-tool.js:288-294 (handler)The handler function for the 'ping' tool, which returns a 'Pong!' response echoing any provided prompt or a default message.case "ping": return { content: [{ type: "text", text: `Pong! ${args.prompt || 'Hello from gemini-cli MCP server!'}` }] };
- lib/fixed-mcp-tool.js:104-118 (schema)The schema definition for the 'ping' tool, including name, description, and optional input schema for a 'prompt' string.{ name: "ping", description: "Echo", inputSchema: { type: "object", properties: { prompt: { type: "string", default: "", description: "Message to echo " } }, required: [] } },
- lib/fixed-mcp-tool.js:217-219 (registration)Registration of all tools (including 'ping') via the ListToolsRequestSchema handler, which returns the tools array containing the ping tool definition.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });