get_message
Retrieve final delivery status and timestamps (created, sent, failed) for a WhatsApp message by providing its ID. Confirm message delivery.
Instructions
Fetch a single message by ID, including final delivery status and timestamps (createdAt, sentAt, failedAt).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messageId | Yes | The message ID returned from send_message (e.g. msg_abc123). |
Implementation Reference
- src/client.ts:145-150 (handler)The actual handler that executes the get_message tool logic. It makes a GET request to /v1/messages/{messageId} with the given message ID, returning the message resource wrapped in an ApiSuccess envelope.
getMessage(messageId: string) { return this.request<ApiSuccess<MessageResource>>( "GET", `/v1/messages/${encodeURIComponent(messageId)}`, ); } - src/index.ts:78-80 (schema)Zod schema for validating the get_message tool input. Expects a single required string field 'messageId'.
const getMessageSchema = z.object({ messageId: z.string().describe("The message ID returned from send_message (e.g. msg_abc123)."), }); - src/index.ts:156-170 (registration)Tool registration as part of the tools array. Defines the tool's name ('get_message'), description, and input JSON Schema.
{ name: "get_message", description: "Fetch a single message by ID, including final delivery status and timestamps (createdAt, sentAt, failedAt).", inputSchema: { type: "object", properties: { messageId: { type: "string", description: "The message ID returned from send_message (e.g. msg_abc123).", }, }, required: ["messageId"], }, }, - src/index.ts:271-272 (registration)Dispatch routing for the get_message tool. Parses args using the Zod schema, extracts messageId, and calls client.getMessage().
case "get_message": return client.getMessage(getMessageSchema.parse(args).messageId);