Skip to main content
Glama
jonathan-politzki

Smartlead Simplified MCP Server

smartlead_retrigger_failed_events

Retrigger failed webhook events for a specific campaign within a defined time period to ensure data delivery and system synchronization.

Instructions

Retrigger failed webhook events (Private Beta feature).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesID of the campaign to retrigger failed webhook events for
fromTimeYesStart date/time in ISO 8601 format (e.g. 2025-03-21T00:00:00Z)
toTimeYesEnd date/time in ISO 8601 format (e.g. 2025-04-04T23:59:59Z)

Implementation Reference

  • Core handler function: validates input params, makes authenticated POST request to SmartLead API endpoint `/campaigns/${campaign_id}/webhooks/retrigger-failed-events` with fromTime and toTime, returns JSON response or formatted error.
    async function handleRetriggerFailedEvents(
      args: unknown,
      apiClient: AxiosInstance,
      withRetry: <T>(operation: () => Promise<T>, context: string) => Promise<T>
    ) {
      if (!isRetriggerFailedEventsParams(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid arguments for smartlead_retrigger_failed_events'
        );
      }
    
      try {
        const smartLeadClient = createSmartLeadClient(apiClient);
        const { campaign_id, fromTime, toTime } = args;
        
        const response = await withRetry(
          async () => smartLeadClient.post(`/campaigns/${campaign_id}/webhooks/retrigger-failed-events`, {
            fromTime,
            toTime
          }),
          'retrigger failed events'
        );
    
        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 metadata and input schema definition: specifies required parameters campaign_id, fromTime, toTime as strings, with descriptions.
    export const RETRIGGER_FAILED_EVENTS_TOOL: CategoryTool = {
      name: 'smartlead_retrigger_failed_events',
      description: 'Retrigger failed webhook events (Private Beta feature).',
      category: ToolCategory.WEBHOOKS,
      inputSchema: {
        type: 'object',
        properties: {
          campaign_id: {
            type: 'string',
            description: 'ID of the campaign to retrigger failed webhook events for',
          },
          fromTime: {
            type: 'string',
            description: 'Start date/time in ISO 8601 format (e.g. 2025-03-21T00:00:00Z)',
          },
          toTime: {
            type: 'string',
            description: 'End date/time in ISO 8601 format (e.g. 2025-04-04T23:59:59Z)',
          },
        },
        required: ['campaign_id', 'fromTime', 'toTime'],
      },
    };
  • src/index.ts:223-223 (registration)
    Registers all webhook tools, including smartlead_retrigger_failed_events, into the central ToolRegistry.
    toolRegistry.registerMany(webhookTools);
  • Runtime type guard for validating input parameters against RetriggerFailedEventsParams interface (defined lines 42-46).
    export function isRetriggerFailedEventsParams(args: unknown): args is RetriggerFailedEventsParams {
      if (typeof args !== 'object' || args === null) return false;
      
      const params = args as Partial<RetriggerFailedEventsParams>;
      
      return (
        typeof params.campaign_id === 'string' &&
        typeof params.fromTime === 'string' &&
        typeof params.toTime === 'string'
      );
    } 
  • Dispatcher case in handleWebhookTool that routes the tool call to the specific handler function.
    case 'smartlead_retrigger_failed_events': {
      return handleRetriggerFailedEvents(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 full burden. It mentions 'retrigger' which implies a write/mutation operation, but doesn't disclose behavioral traits like whether this is idempotent, what happens to previously sent events, error handling, rate limits, or authentication requirements. The 'Private Beta feature' note adds some context about maturity but not operational behavior.

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 extremely concise at just 6 words, with zero wasted language. It's front-loaded with the core action and includes a relevant qualification ('Private Beta feature') that adds context without verbosity. Every word earns its place in this minimal description.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'retrigger' means operationally, what the tool returns, error conditions, or side effects. Given the complexity implied by 'failed webhook events' and the absence of structured behavioral information, the description leaves critical gaps for agent understanding.

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?

Schema description coverage is 100%, with all three parameters clearly documented in the schema. The description adds no additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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

Purpose3/5

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

The description states the action ('retrigger') and target ('failed webhook events'), which provides a basic purpose. However, it lacks specificity about what 'retrigger' entails operationally and doesn't distinguish this tool from potential siblings like 'smartlead_fetch_webhooks_by_campaign' or 'smartlead_upsert_campaign_webhook' that might handle webhook-related operations. The 'Private Beta feature' note adds context but doesn't clarify the core functionality.

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?

No guidance is provided on when to use this tool versus alternatives. With many sibling tools for campaigns, webhooks, and events, the description doesn't specify prerequisites (e.g., only for campaigns with existing webhooks), exclusions, or related tools. The 'Private Beta' note hints at limited availability but doesn't offer practical usage instructions.

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