Skip to main content
Glama

ping

Verify connectivity and test response by sending a message to the Gemini MCP Tool. Use it to confirm server availability and ensure smooth interaction with Gemini CLI.

Instructions

Echo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptNoMessage to echo

Implementation Reference

  • The execute function of the pingTool, which echoes the prompt message or defaults to 'Pong!' using executeCommand.
    execute: async (args, onProgress) => { const message = args.prompt || args.message || "Pong!"; return executeCommand("echo", [message as string], onProgress); }
  • Zod schema defining the input arguments for the ping tool, including an optional prompt.
    const pingArgsSchema = z.object({ prompt: z.string().default('').describe("Message to echo "), });
  • Registration of the pingTool into the central toolRegistry by pushing it into the array.
    toolRegistry.push( askGeminiTool, pingTool, helpTool, brainstormTool, fetchChunkTool, timeoutTestTool );
  • src/tools/index.ts:4-4 (registration)
    Import of the pingTool from simple-tools.js for registration.
    import { pingTool, helpTool } from './simple-tools.js';
  • Full definition of the pingTool including name, schema, description, and execute handler.
    export const pingTool: UnifiedTool = { name: "ping", description: "Echo", zodSchema: pingArgsSchema, prompt: { description: "Echo test message with structured response.", }, category: 'simple', execute: async (args, onProgress) => { const message = args.prompt || args.message || "Pong!"; return executeCommand("echo", [message as string], onProgress); } };

Other Tools

Related 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/jamubc/gemini-mcp-tool'

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