Skip to main content
Glama

marketo_get_bulk_export_status

Check the status of a Marketo bulk export job. Returns status, file size, row count, and timestamps to track export completion.

Instructions

Check the status of a bulk export job. Returns status (Created/Queued/Processing/Completed/Failed/Cancelled), file size, number of rows, and timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exportIdYesExport job ID

Implementation Reference

  • The handler function for the 'marketo_get_bulk_export_status' tool. It takes an exportId, calls makeRequest to GET /bulk/v1/leads/export/{exportId}/status.json, and returns the result.
    server.tool(
      "marketo_get_bulk_export_status",
      "Check the status of a bulk export job. Returns status (Created/Queued/Processing/Completed/Failed/Cancelled), file size, number of rows, and timestamps.",
      {
        exportId: z.string().describe("Export job ID"),
      },
      async (args) => {
        try {
          return ok(await makeRequest(`/bulk/v1/leads/export/${args.exportId}/status.json`));
        } catch (e) { return err(e); }
      }
    );
  • Input schema for marketo_get_bulk_export_status: requires an 'exportId' string describing the export job ID.
    {
      exportId: z.string().describe("Export job ID"),
    },
  • Registration of the tool with the MCP server via server.tool() call, registering the name 'marketo_get_bulk_export_status'.
    server.tool(
      "marketo_get_bulk_export_status",
  • The bulkExport.ts module that contains all bulk export tools. Imports makeRequest, ok, err from ../client.js for HTTP requests and response formatting.
    import { z } from "zod";
    import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { makeRequest, ok, err } from "../client.js";
    
    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); }
        }
      );
    
      server.tool(
        "marketo_enqueue_bulk_export",
        "Enqueue a previously created bulk export job for processing. The job moves from Created to Queued status. Poll status with marketo_get_bulk_export_status.",
        {
          exportId: z.string().describe("Export job ID returned from create"),
        },
        async (args) => {
          try {
            return ok(await makeRequest(
              `/bulk/v1/leads/export/${args.exportId}/enqueue.json`,
              "POST"
            ));
          } catch (e) { return err(e); }
        }
      );
    
      server.tool(
        "marketo_get_bulk_export_status",
        "Check the status of a bulk export job. Returns status (Created/Queued/Processing/Completed/Failed/Cancelled), file size, number of rows, and timestamps.",
        {
          exportId: z.string().describe("Export job ID"),
        },
        async (args) => {
          try {
            return ok(await makeRequest(`/bulk/v1/leads/export/${args.exportId}/status.json`));
          } catch (e) { return err(e); }
        }
      );
    
      server.tool(
        "marketo_get_bulk_export_file",
        "Download the file from a completed bulk export job. Returns CSV/TSV content. Only works when job status is Completed. Large files may be clipped in MCP response.",
        {
          exportId: z.string().describe("Export job ID (must be in Completed status)"),
        },
        async (args) => {
          try {
            return ok(await makeRequest(`/bulk/v1/leads/export/${args.exportId}/file.json`));
          } catch (e) { return err(e); }
        }
      );
    }
  • src/index.ts:13-29 (registration)
    Entry point: imports registerBulkExportTools from bulkExport.ts and calls it to register all bulk export tools including marketo_get_bulk_export_status.
    import { registerBulkExportTools } from "./tools/bulkExport.js";
    
    const server = new McpServer({
      name: "marketo-mcp",
      version: "0.1.0",
    });
    
    // Register all tool groups
    registerFormTools(server);
    registerLeadTools(server);
    registerProgramTools(server);
    registerEmailTools(server);
    registerSmartListTools(server);
    registerListTools(server);
    registerChannelTools(server);
    registerLandingPageTools(server);
    registerBulkExportTools(server);
Behavior3/5

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

No annotations provided, so the description carries the burden. It discloses return fields but does not explicitly state read-only nature, non-destructiveness, or polling behavior, though it is implicit.

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?

Single sentence listing statuses and return fields; no wasted words, highly efficient.

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?

For a simple status check with one parameter and no output schema, the description is complete enough. It specifies return fields and possible statuses.

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% with exportId described as 'Export job ID'. The description adds little beyond schema, so baseline 3 is appropriate.

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?

The description states 'Check the status of a bulk export job' with a clear verb and resource, and lists possible statuses and return fields, distinguishing it from sibling tools like create or enqueue.

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

Usage Guidelines3/5

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

The description implies usage after enqueuing but does not explicitly state when to use it versus alternatives like marketo_get_bulk_export_file or marketo_enqueue_bulk_export, nor mention prerequisites.

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