Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_get_campaign

Retrieve detailed information about a specific email marketing campaign using its unique ID to monitor performance and track campaign metrics.

Instructions

Get details of a specific campaign by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesID of the campaign to retrieve

Implementation Reference

  • The handler function that validates input, makes the API GET request to /campaigns/{campaign_id}, and returns the campaign details or error.
    async function handleGetCampaign(
      args: unknown, 
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isGetCampaignParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_get_campaign'
        );
      }
    
      try {
        const response = await withRetry(
          async () => apiClient.get(`/campaigns/${args.campaign_id}`),
          'get campaign'
        );
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
          isError: false,
        };
      } catch (error: any) {
        return {
          content: [{ 
            type: 'text', 
            text: `API Error: ${error.response?.data?.message || error.message}` 
          }],
          isError: true,
        };
      }
    }
  • Tool schema definition including name, description, category, and input schema requiring 'campaign_id'.
    export const GET_CAMPAIGN_TOOL: CategoryTool = {
      name: 'smartlead_get_campaign',
      description: 'Get details of a specific campaign by ID.',
      category: ToolCategory.CAMPAIGN_MANAGEMENT,
      inputSchema: {
        type: 'object',
        properties: {
          campaign_id: {
            type: 'number',
            description: 'ID of the campaign to retrieve',
          },
        },
        required: ['campaign_id'],
      },
    };
  • src/index.ts:197-199 (registration)
    Registers the campaignTools array (which includes smartlead_get_campaign) with the tool registry if campaignManagement category is enabled.
    if (enabledCategories.campaignManagement) {
      toolRegistry.registerMany(campaignTools);
    }
  • Type guard function used in the handler to validate that input args contain a valid 'campaign_id' number.
    export function isGetCampaignParams(args: unknown): args is GetCampaignParams {
      return (
        typeof args === 'object' &&
        args !== null &&
        'campaign_id' in args &&
        typeof (args as { campaign_id: unknown }).campaign_id === 'number'
      );
    }
  • Switch case in handleCampaignTool that routes 'smartlead_get_campaign' calls to the specific handleGetCampaign function.
    case 'smartlead_get_campaign': {
      return handleGetCampaign(args, apiClient, withRetry);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Get details' implies a read-only operation, the description doesn't specify whether this requires authentication, what format the details are returned in, whether there are rate limits, or what happens if the campaign ID doesn't exist. For a tool with zero annotation coverage, this represents significant gaps in behavioral context.

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

Conciseness5/5

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

The description is a single, clear sentence that efficiently communicates the core functionality. There's no wasted language or unnecessary elaboration, making it easy to parse while conveying the essential information about what the tool does.

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

Completeness3/5

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

For a simple read operation with one well-documented parameter and no output schema, the description is minimally adequate. However, without annotations or output schema, it should ideally provide more context about what 'details' are returned, authentication requirements, or error conditions. The description meets basic requirements but leaves important behavioral aspects unspecified.

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

Parameters3/5

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

With 100% schema description coverage, the input schema already fully documents the single required parameter (campaign_id). The description adds no additional parameter information beyond what's in the schema, so it meets the baseline expectation but doesn't provide extra value regarding parameter usage, constraints, or examples.

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

Purpose4/5

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

The description clearly states the action ('Get details') and resource ('specific campaign by ID'), making the purpose immediately understandable. However, it doesn't differentiate from similar tools like 'smartlead_get_campaign_statistics' or 'smartlead_get_campaign_analytics_by_date' which might also retrieve campaign information but with different focus or scope.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With numerous sibling tools that also retrieve campaign-related data (e.g., smartlead_get_campaign_statistics, smartlead_get_campaign_analytics_by_date), there's no indication of what distinguishes this basic 'get details' operation from more specialized campaign retrieval tools.

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/jonathan-politzki/smartlead-mcp-server'

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