---
name: scitex-notification
description: One-call alerting across 9 backends — audio TTS (spoken notification), desktop popup, emacs minibuffer, matplotlib banner, playwright browser toast, email (SMTP), webhook (HTTP POST), Telegram message, and Twilio phone call / SMS — with automatic fallback (default order: audio → emacs → matplotlib → playwright → email) and level-based routing (info / warning / error / critical can trigger different backend sets). Drop-in replacement for ad-hoc `smtplib.sendmail`, `requests.post(slack_webhook, ...)`, `plyer.notification.notify`, `twilio.rest.Client().calls.create`, `python-telegram-bot`, and hand-rolled "print + beep + email" patterns. Use whenever the user asks to "notify me when this finishes", "alert me if training fails", "send me an email when done", "call my phone if the server goes down", "text me the result", "push a Telegram message", "beep when the job completes", "escalate to phone call on critical errors", "ping Slack / webhook", or is wiring up notifications from scripts, pipelines, or AI agents.
allowed-tools: mcp__scitex__notification_*
tags: [scitex-notification, scitex-package]
---

# scitex-notification

Multi-backend alerting with automatic fallback. One `alert()` covers local and remote delivery.

## Sub-skills

* [01_python-api](01_python-api.md) — `alert()`, `call()`, `sms()` signatures, backends table, env vars
* [02_mcp-tools](02_mcp-tools.md) — MCP tool schemas: `notify`, `notify_by_level`, `list_notification_backends`
* [03_configuration](03_configuration.md) — YAML config, `UIConfig`, level-based routing
* [04_cli-reference](04_cli-reference.md) — CLI commands: `send`, `call`, `sms`, `backends`, `config`
* [05_backends](05_backends.md) — Per-backend setup, env vars, availability checks

## Quick Start

```python
import scitex_notification as stxn

# Simple alert — fallback: audio -> emacs -> matplotlib -> playwright -> email
stxn.alert("Training complete!")

# Specific backend, no fallback
stxn.alert("Error in pipeline", backend="email", level="error")

# Multiple backends simultaneously
stxn.alert("Critical!", backend=["audio", "email"])

# Phone call via Twilio (requires SCITEX_NOTIFICATION_TWILIO_* env vars)
stxn.call("Wake up! Server is down!")

# SMS via Twilio
stxn.sms("Build finished successfully")
```

## CLI

```bash
scitex-notification send "Task done!"
scitex-notification call "Wake up!" --repeat 2
scitex-notification sms "Build complete"
scitex-notification backends          # List available backends
scitex-notification config            # Show configuration
scitex-notification mcp start         # Start MCP server
```

## MCP Tools

| Tool | Purpose |
|------|---------|
| `notify` | Send alert via one or more backends with fallback |
| `notify_by_level` | Route by info / warning / error / critical to configured backend sets |
| `list_notification_backends` | List every registered backend with status |
| `available_notification_backends` | List backends that are currently working (deps + creds OK) |
| `get_notification_config` | Show active config (fallback order, level routing, timeouts) |

> Note: `call()` (Twilio phone) and `sms()` (Twilio SMS) are exposed via the Python API and CLI, not as standalone MCP tools. They reach through `notify` when `backend="twilio"`.
