Skip to main content
Glama

ping

Test connection to the Qwen MCP Tool server by sending and receiving echo messages to verify communication functionality.

Instructions

Echo a message to test the connection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptNoMessage to echoPong!

Implementation Reference

  • The execute handler for the ping tool, which takes an optional prompt and echoes it back using executeSimpleCommand with CLI echo command.
    execute: async (args) => {
      const message = args.prompt || "Pong!";
      return executeSimpleCommand(CLI.COMMANDS.ECHO, [message]);
    },
  • Zod input schema for the ping tool defining an optional 'prompt' string defaulting to 'Pong!'.
    zodSchema: z.object({
      prompt: z.string().optional().default("Pong!").describe("Message to echo")
    }),
  • Registration of the pingTool into the tool registry.
    registerTool(pingTool);
  • Prompt schema definition for the ping tool used for model interaction.
    prompt: {
      name: "ping",
      description: "Test the connection with a simple echo",
      arguments: [
        {
          name: "prompt",
          description: "Optional message to echo (defaults to 'Pong!')",
          required: false
        }
      ]
    }
  • src/tools/index.ts:6-6 (registration)
    Import of pingTool from simple-tools.js for registration.
    import { pingTool, helpTool } from "./simple-tools.js";
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/Jaggerxtrm/qwen-mcp-tool'

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