Skip to main content
Glama

marketo_create_bulk_export_leads

Set up a bulk lead export job by specifying fields and a date range filter. After creation, enqueue the job separately. Exports up to 500MB or 10M records in CSV or TSV format.

Instructions

Create a bulk lead export job. Specify which fields to export and a date range filter. The job must be enqueued separately after creation. Max 500MB or 10M records per export.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYesLead field API names to export
filterYesDate range filter - use createdAt or updatedAt (required)
formatNoExport file formatCSV

Implementation Reference

  • The handler function for the 'marketo_create_bulk_export_leads' tool. It makes a POST request to /bulk/v1/leads/export/create.json with the fields, filter, and format arguments.
    async (args) => {
      try {
        return ok(await makeRequest(
          "/bulk/v1/leads/export/create.json",
          "POST",
          { fields: args.fields, filter: args.filter, format: args.format },
          "application/json"
        ));
      } catch (e) { return err(e); }
    }
  • Zod schema defining the input parameters: fields (array of strings), filter (createdAt/updatedAt date range), and format (CSV/TSV).
    {
      fields: z.array(z.string()).describe("Lead field API names to export"),
      filter: z.object({
        createdAt: z.object({
          startAt: z.string().describe("ISO 8601 start datetime"),
          endAt: z.string().describe("ISO 8601 end datetime"),
        }).optional(),
        updatedAt: z.object({
          startAt: z.string().describe("ISO 8601 start datetime"),
          endAt: z.string().describe("ISO 8601 end datetime"),
        }).optional(),
      }).describe("Date range filter - use createdAt or updatedAt (required)"),
      format: z.enum(["CSV", "TSV"]).default("CSV").describe("Export file format"),
    },
  • The tool is registered via server.tool() inside registerBulkExportTools(), which is called from src/index.ts.
    export function registerBulkExportTools(server: McpServer) {
      server.tool(
        "marketo_create_bulk_export_leads",
        "Create a bulk lead export job. Specify which fields to export and a date range filter. The job must be enqueued separately after creation. Max 500MB or 10M records per export.",
        {
          fields: z.array(z.string()).describe("Lead field API names to export"),
          filter: z.object({
            createdAt: z.object({
              startAt: z.string().describe("ISO 8601 start datetime"),
              endAt: z.string().describe("ISO 8601 end datetime"),
            }).optional(),
            updatedAt: z.object({
              startAt: z.string().describe("ISO 8601 start datetime"),
              endAt: z.string().describe("ISO 8601 end datetime"),
            }).optional(),
          }).describe("Date range filter - use createdAt or updatedAt (required)"),
          format: z.enum(["CSV", "TSV"]).default("CSV").describe("Export file format"),
        },
        async (args) => {
          try {
            return ok(await makeRequest(
              "/bulk/v1/leads/export/create.json",
              "POST",
              { fields: args.fields, filter: args.filter, format: args.format },
              "application/json"
            ));
          } catch (e) { return err(e); }
        }
      );
  • src/index.ts:29-29 (registration)
    Registration call in the main entry point: registerBulkExportTools(server);
    registerBulkExportTools(server);
Behavior3/5

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

No annotations, so description carries full burden. Discloses that it creates a job (not executes) and must be enqueued separately, plus max limits. Does not cover auth, rate limits, or failure behavior, which is acceptable for a create tool.

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?

Three sentences, front-loaded with purpose, then details, then constraints. No redundant words. Every sentence adds 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?

Covers purpose, key parameters, and essential behavioral fact (enqueue separately). Missing return value or job ID hint, but schema coverage is high and no output schema exists. Adequate for the complexity.

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 coverage is 100%, so baseline 3. Description mentions 'fields' and 'date range filter' which align with schema parameters. Does not add new meaning beyond schema; format parameter is omitted.

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?

Clearly states 'Create a bulk lead export job' with specific resource and verb. Mentions specifying fields and date range filter, and distinguishes from sibling tools by noting the need to enqueue separately.

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?

Provides guidance on what to specify (fields, date range) and a key requirement (enqueue after creation). Also gives size limits. Lacks explicit 'when to use vs alternatives' but implies a multi-step process.

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/ZLeventer/marketo-mcp-server'

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