whatsapp

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package whatsapp provides tools for WhatsApp Business via the Cloud API.

Authentication: WhatsApp Business Cloud API (Meta for Developers). Required env vars:

WHATSAPP_PHONE_NUMBER_ID  — phone number ID from Meta Business dashboard
WHATSAPP_TOKEN            — permanent or temporary access token
WHATSAPP_VERIFY_TOKEN     — webhook verify token (for receiving messages)

All messaging through WhatsApp API requires:

  • A Meta Business account
  • An approved WhatsApp Business app
  • Message templates approved by Meta for outbound-initiated messages

Tools planned (see GitHub issue):

whatsapp_send     — send a text or template message
whatsapp_send_media — send image/document/audio
whatsapp_webhook  — receive and parse incoming messages (via webhook)

Index

Constants

View Source
const (
	SendToolName    = "whatsapp_send"
	SendDisplayName = "Send WhatsApp Message"
	SendDescription = `` /* 710-byte string literal not displayed */

)

Variables

View Source
var ErrNotImplemented = errors.New("whatsapp tools: not implemented — see GitHub issue")

ErrNotImplemented is returned by all WhatsApp tools until the API client is complete (see GitHub issue). WhatsApp Business API requires Meta developer account approval before testing is possible.

Functions

This section is empty.

Types

type SendTool

type SendTool struct{}

func NewSendTool

func NewSendTool() *SendTool

func (*SendTool) BackfillInput

func (t *SendTool) BackfillInput(_ context.Context, input map[string]any) map[string]any

func (*SendTool) Call

func (*SendTool) CheckPermissions

func (t *SendTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult

func (*SendTool) Definition

func (t *SendTool) Definition() tool.Definition

func (*SendTool) Description

func (t *SendTool) Description(_ context.Context) (string, error)

func (*SendTool) FormatResult

func (t *SendTool) FormatResult(data any) string

func (*SendTool) IsConcurrencySafe

func (t *SendTool) IsConcurrencySafe(_ map[string]any) bool

func (*SendTool) IsEnabled

func (t *SendTool) IsEnabled() bool

func (*SendTool) IsReadOnly

func (t *SendTool) IsReadOnly(_ map[string]any) bool

func (*SendTool) ValidateInput

func (t *SendTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL