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
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | Message to echo | Pong! |
Implementation Reference
- src/tools/simple-tools.ts:16-19 (handler)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]); }, - src/tools/simple-tools.ts:13-15 (schema)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") }), - src/tools/index.ts:10-10 (registration)Registration of the pingTool into the tool registry.
registerTool(pingTool); - src/tools/simple-tools.ts:20-30 (schema)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";