Skip to main content
Glama
bcharleson

Instantly MCP Server

create_lead_list

Generate targeted lead lists for email campaigns by organizing contacts with custom names and descriptions to streamline outreach efforts.

Instructions

Create a new lead list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoList description
nameYesList name

Implementation Reference

  • The handler function that implements the core logic for the 'create_lead_list' tool. It validates input, builds the API request to POST /lead-lists, and formats the MCP response.
    async function handleCreateLeadList(args: any, apiKey: string) {
      console.error('[Instantly MCP] 📋 Executing create_lead_list...');
    
      if (!args.name) {
        throw new McpError(ErrorCode.InvalidParams, 'Name is required for create_lead_list');
      }
    
      // Build list data with official API v2 parameters
      const listData: any = { name: args.name };
      if (args.has_enrichment_task !== undefined) listData.has_enrichment_task = args.has_enrichment_task;
      if (args.owned_by) listData.owned_by = args.owned_by;
    
      console.error(`[Instantly MCP] 📤 Creating lead list with data: ${JSON.stringify(listData, null, 2)}`);
    
      const createResult = await makeInstantlyRequest('/lead-lists', { method: 'POST', body: listData }, apiKey);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              lead_list: createResult,
              message: 'Lead list created successfully'
            }, null, 2)
          }
        ]
      };
    }
  • The tool registration in the leadTools array, defining name, description, input schema, and annotations for the MCP server.
    {
      name: 'create_lead_list',
      title: 'Create Lead List',
      description: 'Create list. Set has_enrichment_task=true for auto-enrich.',
      annotations: { destructiveHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string', description: 'List name' },
          has_enrichment_task: { type: 'boolean' },
          owned_by: { type: 'string', description: 'Owner UUID' }
        },
        required: ['name']
      }
    },
  • Zod schema for validating inputs to the create_lead_list tool.
    export const CreateLeadListSchema = z.object({
      name: z.string().min(1, { message: 'Lead list name cannot be empty' }),
      has_enrichment_task: z.boolean().optional(),
      owned_by: z.string().optional()
    });
  • Validation function specifically for create_lead_list inputs using the Zod schema.
    export function validateCreateLeadListData(args: unknown): z.infer<typeof CreateLeadListSchema> {
      return validateWithSchema(CreateLeadListSchema, args, 'create_lead_list');
    }
  • Switch case in handleLeadTool that routes 'create_lead_list' calls to the handler function.
    case 'create_lead_list':
      return handleCreateLeadList(args, apiKey);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Create a new lead list' implies a write/mutation operation, but it doesn't disclose permissions needed, whether the operation is idempotent, what happens on failure, or what the response contains. For a creation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 maximally concise with just four words that directly state the tool's purpose. There's zero wasted language, and it's perfectly front-loaded. Every word earns its place.

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 creation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what a 'lead list' is in this system's context, what happens after creation, or how this differs from similar creation tools. The description should provide more context given the tool's complexity and lack of structured metadata.

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%, so the schema already documents both parameters (name and description) with their types and requirements. The description doesn't add any parameter semantics beyond what's in the schema, such as format constraints or examples. Baseline 3 is appropriate when schema does the heavy lifting.

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 'Create a new lead list' clearly states the verb ('create') and resource ('lead list'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'create_campaign' or 'create_lead' by specifying what distinguishes a lead list from these other resources.

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. There are multiple sibling tools for creating resources (create_campaign, create_lead), but the description doesn't explain what a 'lead list' is or when it should be created instead of other entities. No prerequisites or exclusions are mentioned.

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/bcharleson/Instantly-MCP'

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