Skip to main content
Glama

get_campaign

Fetch detailed information about a specific newsletter campaign by providing its ID, including subject, content, sender details, target segment, and delivery status.

Instructions

Fetch a single campaign by ID.

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

Returns: Campaign details including subject, body, sender, segment, and delivery status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes

Implementation Reference

  • The MCP tool definition for `get_campaign` which serves as the entry point and registers the tool.
    @mcp.tool()
    def get_campaign(campaign_id: str) -> dict:
        """
        Fetch a single campaign by ID.
    
        Args:
            campaign_id: The campaign ID (e.g. "mc_12345").
    
        Returns:
            Campaign details including subject, body, sender, segment, and delivery status.
        """
        return _client.get_campaign(campaign_id)
  • The actual implementation of `get_campaign` in the `KeilaClient` class, which makes the HTTP request to the Keila API.
    def get_campaign(self, campaign_id: str) -> dict:
        """Fetch a single campaign by ID."""
        resp = self.session.get(f"{self.url}/api/v1/campaigns/{campaign_id}", headers=self._headers(), timeout=30)
        resp.raise_for_status()
        return resp.json()

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