extract_verification_link
Extract verification links from email messages to enable automated account activation and email confirmation processes.
Instructions
Extract the most likely verification link from an email.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message_text | No | ||
| inbox_id | No | ||
| message_id | No | ||
| preferred_domains | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The 'run' function in 'extract_verification_link.py' serves as the primary handler for the 'extract_verification_link' MCP tool, which resolves the email message text and identifies potential verification URLs.
async def run( api: ApiClient, message_text: str | None = None, inbox_id: str | None = None, message_id: str | None = None, preferred_domains: list[str] | None = None, ) -> dict[str, Any]: resolved_text, error, _ = await resolve_message_text( api=api, message_text=message_text, inbox_id=inbox_id, message_id=message_id, ) if error: return error if not resolved_text: return tool_error("empty_message", 422, "Message body is empty") candidates = extract_verification_link_candidates( text=resolved_text, preferred_domains=preferred_domains, ) return { "verification_link": candidates[0] if candidates else None, "candidates": candidates, }