Skip to content

Comments

feat(tools): add Brevo transactional email and SMS integration#5136

Open
Hustple wants to merge 1 commit intoaden-hive:mainfrom
Hustple:feature/brevo-tool
Open

feat(tools): add Brevo transactional email and SMS integration#5136
Hustple wants to merge 1 commit intoaden-hive:mainfrom
Hustple:feature/brevo-tool

Conversation

@Hustple
Copy link

@Hustple Hustple commented Feb 20, 2026

Description

Adds a Brevo integration that enables Hive agents to send transactional emails, SMS messages, and manage contacts via the Brevo API.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Fixes #5127

Changes Made

  • Add tools/src/aden_tools/tools/brevo_tool/brevo_tool.py with 6 MCP tools: brevo_send_email, brevo_send_sms, brevo_create_contact, brevo_get_contact, brevo_update_contact, brevo_get_email_stats
  • Add tools/src/aden_tools/tools/brevo_tool/__init__.py with register_tools export
  • Add tools/src/aden_tools/tools/brevo_tool/README.md with setup instructions and usage examples
  • Add tools/src/aden_tools/credentials/brevo.py with CredentialSpec for BREVO_API_KEY
  • Add tools/tests/tools/test_brevo_tool.py with 34 unit tests
  • Register brevo_tool in tools/src/aden_tools/tools/__init__.py
  • Register BREVO_CREDENTIALS in tools/src/aden_tools/credentials/__init__.py

Tool Summary

Tool Purpose
brevo_send_email Send a transactional email with HTML content
brevo_send_sms Send a transactional SMS to a phone number
brevo_create_contact Create a new contact in Brevo
brevo_get_contact Retrieve contact details by email
brevo_update_contact Update an existing contact's attributes
brevo_get_email_stats Get delivery status for a sent email

Environment Variables

Variable Required Description
BREVO_API_KEY Yes Brevo API key from Settings → API Keys

Setup Instructions

  1. Sign up at https://www.brevo.com (free tier available - 300 emails/day)
  2. Go to Settings → API Keys → Generate a new API key
  3. Set BREVO_API_KEY environment variable or configure via credential store
  4. Verify your sender email address in Brevo before sending emails

Testing

Verified import success:

uv run python3 -c "from src.aden_tools.tools.brevo_tool.brevo_tool import register_tools; print('Import OK!')"
# Output: Import OK!

Verified all 6 tools register correctly:

uv run python3 -c "
from fastmcp import FastMCP
from src.aden_tools.tools import register_all_tools
mcp = FastMCP('test')
tools = register_all_tools(mcp)
brevo_tools = [t for t in tools if t.startswith('brevo')]
print(brevo_tools)
"
# Output: ['brevo_send_email', 'brevo_send_sms', 'brevo_create_contact',
#          'brevo_get_contact', 'brevo_update_contact', 'brevo_get_email_stats']

34 unit tests pass:

uv run pytest tests/tools/test_brevo_tool.py -v
# Output: 34 passed in 2.45s

Tests cover:

  • Credential handling (missing credentials error)
  • brevo_send_email — success, input validation, auth error, timeout
  • brevo_send_sms — success, phone format validation, content length, timeout
  • brevo_create_contact — success, list_ids parsing, validation, timeout
  • brevo_get_contact — success, not found, validation, timeout
  • brevo_update_contact — success, list_ids parsing, validation, timeout
  • brevo_get_email_stats — success, empty message_id, not found, timeout
  • Tool registration — all 6 tools, with and without credentials

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

- Add brevo_tool with 6 MCP tools: brevo_send_email, brevo_send_sms,
  brevo_create_contact, brevo_get_contact, brevo_update_contact,
  brevo_get_email_stats
- Add CredentialSpec for BREVO_API_KEY in credentials/brevo.py
- Register brevo_tool in tools/__init__.py and credentials/__init__.py
- Add README with setup instructions and usage examples
- Add 34 unit tests covering all tools, validation and error handling

Closes aden-hive#5127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Integration]: Add Brevo (Transactional Email & SMS) integration

1 participant