Skip to main content
Glama

send_campaign

Send an email campaign immediately to all contacts or specific segments using the Keila newsletter API. Confirm campaign ID before sending to ensure correct delivery.

Instructions

Send a campaign immediately to all contacts (or segment contacts).

WARNING: This sends real emails. Make sure the campaign content and recipient list are correct before calling this.

Args: campaign_id: The campaign ID (e.g. "mc_12345").

Returns: Delivery queued confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes

Implementation Reference

  • MCP tool registration for send_campaign in mcp_server.py.
    @mcp.tool()
    def send_campaign(campaign_id: str) -> dict:
        """
        Send a campaign immediately to all contacts (or segment contacts).
    
        WARNING: This sends real emails. Make sure the campaign content and
        recipient list are correct before calling this.
    
        Args:
            campaign_id: The campaign ID (e.g. "mc_12345").
    
        Returns:
            Delivery queued confirmation.
        """
        return _client.send_campaign(campaign_id)
  • Actual implementation of send_campaign using the Keila API.
    def send_campaign(self, campaign_id: str) -> dict:
        """Send a campaign immediately."""
        resp = self.session.post(f"{self.url}/api/v1/campaigns/{campaign_id}/actions/send",
                                headers=self._headers(), timeout=30)
        resp.raise_for_status()
        return resp.json()
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full disclosure burden. It successfully warns that this 'sends real emails' (destructive/irreversible behavior) and documents the return value ('Delivery queued confirmation'). Missing explicit rate limits or auth requirements, but covers critical safety context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured docstring format with clear WARNING block upfront. The Args/Returns sections are efficient. Slightly formal structure but no wasted sentences—every element earns its place by conveying safety info, parameter format, or return value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Appropriate for a single-parameter mutation tool without annotations or output schema. The description supplies the missing parameter documentation and explains the return value (delivery confirmation). Could strengthen by mentioning that the campaign must exist (prerequisite) but sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Critical compensation for 0% schema description coverage. The Args section provides the parameter description and crucial example format ('mc_12345'), without which the agent would have no guidance on the campaign_id format. Fully bridges the schema documentation gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Excellent specificity: 'Send a campaign immediately' provides the verb (Send), resource (campaign), execution timing (immediately), and scope (to all contacts or segment contacts). The 'immediately' distinguishes it from the sibling tool schedule_campaign.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Contains strong safety guidance via the WARNING about real emails and validation needs. However, it doesn't explicitly name schedule_campaign as the alternative for non-immediate sending, requiring the agent to infer this from the 'immediately' keyword.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gwbischof/keila-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server