Echo test
echo_testVerifies the MCP server pipeline end-to-end by echoing back any input message with a server-side ISO timestamp.
Instructions
Returns the provided message and a server-side ISO timestamp. Used to verify the MCP server pipeline end-to-end.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Arbitrary string the server will echo back |
Implementation Reference
- src/tools/echo-test.ts:27-34 (handler)The core handler function that echoes the input message back with a server-side timestamp. It takes a message string and returns a ToolResult containing the echoed message and an ISO timestamp.
export async function echoTestHandler(input: EchoTestInput): Promise<ToolResult<EchoTestOutput>> { return Promise.resolve( ok({ message: input.message, receivedAt: new Date().toISOString(), }), ); } - src/tools/echo-test.ts:16-18 (schema)Zod input schema defining the 'message' field: a string of length 1-1024 characters.
export const EchoTestInputSchema = z.object({ message: z.string().min(1).max(1024).describe("Arbitrary string the server will echo back"), }); - src/tools/echo-test.ts:36-44 (registration)Tool definition using defineTool(), binding the name 'echo_test', its description, input schema, and handler.
export const echoTestTool = defineTool({ name: "echo_test", title: "Echo test", description: "Returns the provided message and a server-side ISO timestamp. " + "Used to verify the MCP server pipeline end-to-end.", inputSchema: EchoTestInputSchema, handler: echoTestHandler, }); - src/tools/index.ts:49-50 (registration)The tool is included in the allTools array at position 0, which is passed to registerAllTools() in server.ts.
export const allTools: readonly ToolDefinition[] = [ echoTestTool, - src/server.ts:67-67 (registration)registerAllTools() called with allTools, which includes echoTestTool, registering it with the MCP server.
registerAllTools(this.server, allTools, this.config, this.auditLogger ?? undefined);