echo
Test and validate messaging functionality by returning the exact input message. Use this tool to ensure communication systems are working as expected on the ZIP-MCP server.
Instructions
Return the input message (for testing)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
}
Implementation Reference
- src/index.ts:352-359 (handler)The execute handler for the 'echo' tool, which returns the input message along with the current timestamp.execute: async (args) => { return { content: [ { type: "text", text: args.message }, { type: "text", text: new Date().toISOString() }, ], }; },
- src/index.ts:349-351 (schema)Zod schema defining the input parameter 'message' as a string.parameters: z.object({ message: z.string(), }),
- src/index.ts:346-360 (registration)Registration of the 'echo' tool using server.addTool, including name, description, schema, and handler.server.addTool({ name: "echo", description: "Return the input message (for testing)", parameters: z.object({ message: z.string(), }), execute: async (args) => { return { content: [ { type: "text", text: args.message }, { type: "text", text: new Date().toISOString() }, ], }; }, });