Skip to main content
Glama

marketo_get_landing_pages

Retrieve Marketo landing pages with pagination and status filters (approved or draft). Returns metadata including URL, template, and mobile enablement.

Instructions

List landing pages in Marketo. Supports pagination via maxReturn/offset and filtering by status (approved/draft). Returns LP metadata including URL, template, and mobile enablement status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxReturnNoMax landing pages to return (1-200, default 20)
offsetNoPagination offset
statusNoFilter by approval status

Implementation Reference

  • Registration function that registers all landing page tools including 'marketo_get_landing_pages' via server.tool()
    export function registerLandingPageTools(server: McpServer) {
      // ── marketo_get_landing_pages ──────────────────────────────────────────────
      server.tool(
        "marketo_get_landing_pages",
        "List landing pages in Marketo. Supports pagination via maxReturn/offset and filtering by status (approved/draft). Returns LP metadata including URL, template, and mobile enablement status.",
        {
          maxReturn: z.number().optional().describe("Max landing pages to return (1-200, default 20)"),
          offset: z.number().optional().describe("Pagination offset"),
          status: z.enum(["approved", "draft"]).optional().describe("Filter by approval status"),
        },
        async (args) => {
          try {
            const params: Record<string, unknown> = {};
            if (args.maxReturn) params.maxReturn = args.maxReturn;
            if (args.offset) params.offset = args.offset;
            if (args.status) params.status = args.status;
            return ok(await makeRequest("/rest/asset/v1/landingPages.json", "GET", params));
          } catch (e) { return err(e); }
        }
      );
  • Tool definition and handler for 'marketo_get_landing_pages'. Makes a GET request to /rest/asset/v1/landingPages.json with optional query params (maxReturn, offset, status).
    server.tool(
      "marketo_get_landing_pages",
      "List landing pages in Marketo. Supports pagination via maxReturn/offset and filtering by status (approved/draft). Returns LP metadata including URL, template, and mobile enablement status.",
      {
        maxReturn: z.number().optional().describe("Max landing pages to return (1-200, default 20)"),
        offset: z.number().optional().describe("Pagination offset"),
        status: z.enum(["approved", "draft"]).optional().describe("Filter by approval status"),
      },
      async (args) => {
        try {
          const params: Record<string, unknown> = {};
          if (args.maxReturn) params.maxReturn = args.maxReturn;
          if (args.offset) params.offset = args.offset;
          if (args.status) params.status = args.status;
          return ok(await makeRequest("/rest/asset/v1/landingPages.json", "GET", params));
        } catch (e) { return err(e); }
      }
  • Zod schema defining inputs: maxReturn (optional number), offset (optional number), status (optional enum: approved|draft)
    {
      maxReturn: z.number().optional().describe("Max landing pages to return (1-200, default 20)"),
      offset: z.number().optional().describe("Pagination offset"),
      status: z.enum(["approved", "draft"]).optional().describe("Filter by approval status"),
  • makeRequest helper that handles authenticated HTTP requests to Marketo API, used by the handler
    export async function makeRequest<T = unknown>(
      endpoint: string,
      method: Method = "GET",
      data?: unknown,
      contentType?: string,
    ): Promise<T> {
      const token = await getAccessToken();
      const config: AxiosRequestConfig = {
        url: `${MARKETO_BASE_URL}${endpoint}`,
        method,
        headers: {
          Authorization: `Bearer ${token}`,
          ...(contentType ? { "Content-Type": contentType } : {}),
        },
        ...(data && method !== "GET" ? { data } : {}),
        ...(data && method === "GET" ? { params: data } : {}),
      };
    
      const res = await axios(config);
      const body = res.data;
    
      // Marketo REST API returns errors inside the response body
      if (body?.errors?.length) {
        const e = body.errors[0];
        throw new MarketoError(`${e.code}: ${e.message}`, res.status);
      }
    
      return body as T;
    }
  • src/index.ts:12-28 (registration)
    Imports and calls registerLandingPageTools(server) to wire up the tool
    import { registerLandingPageTools } from "./tools/landingPages.js";
    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);
Behavior3/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. It implies a read operation by stating 'list' and 'returns metadata,' but does not explicitly declare that it is read-only or non-destructive. The side effects are not disclosed, but none are expected for a listing 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?

The description is brief (two sentences) and front-loaded with the purpose. It efficiently conveys the essential functionality without unnecessary words.

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?

With no output schema, the description compensates by specifying return fields (URL, template, mobile enablement status). It is adequate for a listing tool but could be more comprehensive about all fields returned.

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?

The schema covers 100% of parameters with descriptions. The description reiterates the pagination and filtering capabilities, adding grouping context (e.g., maxReturn and offset as pagination) but no new semantic meaning beyond the schema.

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 clearly states the action: 'List landing pages in Marketo,' with a specific verb and resource. It distinguishes from the sibling tool `marketo_get_landing_page_by_id` by indicating it returns multiple pages, not a single one.

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 mentions pagination and filtering options, implying when to use them, but does not explicitly state when to prefer this tool over alternatives like `marketo_get_landing_page_by_id` or other listing 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/ZLeventer/marketo-mcp-server'

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