list_campaigns
Retrieve all newsletter campaigns from Keila to view subjects, schedules, and statuses for managing email marketing efforts.
Instructions
List all campaigns in Keila.
Returns: A dict with 'data' (list of campaigns). Each campaign has id, subject, text_body, sender_id, segment_id, settings, sent_at, scheduled_for, and timestamps.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- client.py:104-108 (handler)The implementation of the campaign list retrieval via the API client.
def list_campaigns(self) -> dict: """List all campaigns.""" resp = self.session.get(f"{self.url}/api/v1/campaigns", headers=self._headers(), timeout=30) resp.raise_for_status() return resp.json() - mcp_server.py:99-108 (registration)The MCP tool registration and wrapper that calls the client's list_campaigns method.
@mcp.tool() def list_campaigns() -> dict: """ List all campaigns in Keila. Returns: A dict with 'data' (list of campaigns). Each campaign has id, subject, text_body, sender_id, segment_id, settings, sent_at, scheduled_for, and timestamps. """ return _client.list_campaigns()