ping
Check if the P-Link-MCP payment server is operational by sending a health verification request. Returns status confirmation when the server is active and responding.
Instructions
Simple MCP server health check. Returns { result: 'OK' } if the server is alive.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| msg | No |
Implementation Reference
- src/stdio.ts:76-79 (handler)Handler function for the 'ping' tool. Takes optional 'msg' input and returns a pong response with echoed message in both content and structuredContent.async ({ msg }: { msg?: string }) => ({ content: [{ type: 'text', text: `pong${msg ? ': ' + msg : ''}` }], structuredContent: { ok: true, echo: msg ?? null }, })
- src/stdio.ts:74-74 (schema)Input schema for ping tool: optional string 'msg'.inputSchema: { msg: z.string().optional() }, // ✅ ZodRawShape
- src/stdio.ts:69-80 (registration)Registration of the 'ping' tool on the MCP server using registerTool, including title, description, schema, and inline handler.(server as any).registerTool( 'ping', { title: t('tools.ping.title'), description: t('tools.ping.description'), inputSchema: { msg: z.string().optional() }, // ✅ ZodRawShape }, async ({ msg }: { msg?: string }) => ({ content: [{ type: 'text', text: `pong${msg ? ': ' + msg : ''}` }], structuredContent: { ok: true, echo: msg ?? null }, }) );