Skip to main content
Glama

marketo_clone_landing_page

Clone an existing Marketo landing page to create a draft copy in a specified folder. Provide the source page ID, new name, and destination folder to generate a duplicate for reuse.

Instructions

Clone an existing Marketo landing page. Creates a draft copy with the specified name in the target folder.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the landing page to clone
nameYesName for the cloned landing page
folderIdYesDestination folder ID
folderTypeNoType of destination folderFolder
descriptionNoDescription for the cloned landing page

Implementation Reference

  • The async handler function that executes the clone logic: builds the request body with name, folder (JSON-serialized), optional description, and POSTs to /rest/asset/v1/landingPage/{id}/clone.json using application/x-www-form-urlencoded content type.
      async (args) => {
        try {
          const body: Record<string, unknown> = {
            name: args.name,
            folder: JSON.stringify({ id: args.folderId, type: args.folderType }),
          };
          if (args.description) body.description = args.description;
          return ok(await makeRequest(
            `/rest/asset/v1/landingPage/${args.id}/clone.json`,
            "POST",
            body,
            "application/x-www-form-urlencoded"
          ));
        } catch (e) { return err(e); }
      }
    );
  • Zod schema for input validation: id (number), name (string), folderId (number), folderType (enum 'Folder'|'Program' default 'Folder'), description (optional string).
    {
      id: z.number().describe("ID of the landing page to clone"),
      name: z.string().describe("Name for the cloned landing page"),
      folderId: z.number().describe("Destination folder ID"),
      folderType: z.enum(["Folder", "Program"]).default("Folder").describe("Type of destination folder"),
      description: z.string().optional().describe("Description for the cloned landing page"),
    },
  • Tool registered via server.tool('marketo_clone_landing_page', ...) inside registerLandingPageTools(server), which is called from src/index.ts:28.
    // ── marketo_clone_landing_page ─────────────────────────────────────────────
    server.tool(
      "marketo_clone_landing_page",
      "Clone an existing Marketo landing page. Creates a draft copy with the specified name in the target folder.",
      {
        id: z.number().describe("ID of the landing page to clone"),
        name: z.string().describe("Name for the cloned landing page"),
        folderId: z.number().describe("Destination folder ID"),
        folderType: z.enum(["Folder", "Program"]).default("Folder").describe("Type of destination folder"),
        description: z.string().optional().describe("Description for the cloned landing page"),
      },
      async (args) => {
        try {
          const body: Record<string, unknown> = {
            name: args.name,
            folder: JSON.stringify({ id: args.folderId, type: args.folderType }),
          };
          if (args.description) body.description = args.description;
          return ok(await makeRequest(
            `/rest/asset/v1/landingPage/${args.id}/clone.json`,
            "POST",
            body,
            "application/x-www-form-urlencoded"
          ));
        } catch (e) { return err(e); }
      }
    );
  • makeRequest helper that handles HTTP calls with auth token injection, used by the handler to POST the clone request.
    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;
    }
    
    // ─── Response helpers (match GSC MCP pattern) ─────────────────────────────────
    
    export function ok(data: unknown) {
      return {
        content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
      };
    }
  • ok/err response helpers that format the MCP content response, used by the handler to return results.
    export function ok(data: unknown) {
      return {
        content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
      };
    }
    
    export function err(e: unknown) {
      const msg = e instanceof Error ? e.message : String(e);
      return {
        isError: true,
        content: [{ type: "text" as const, text: `Error: ${msg}` }],
      };
    }
Behavior3/5

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

Without annotations, the description carries full burden. It discloses the result as a 'draft copy', indicating the operation is non-destructive and produces an unpublished version. However, it does not mention permissions, rate limits, or error handling.

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 a single, direct sentence with no filler phrases. Every word contributes to conveying the tool's purpose and outcome.

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?

The description adequately explains the core functionality for a simple clone operation. It lacks details on behavior when the source ID is invalid or naming conflicts arise, but these are minor gaps for a relatively straightforward tool with no output schema.

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 all parameters described. The description adds minimal meaning beyond the schema (e.g., 'draft copy', 'target folder'), but does not significantly enhance understanding of the parameters' roles.

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 ('Clone an existing Marketo landing page') and the outcome ('Creates a draft copy with the specified name in the target folder'), distinguishing it from sibling clone tools for other Marketo entities like emails or forms.

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 when to use this tool (clone a landing page) but provides no guidance on when not to use it or alternatives (e.g., creating from scratch vs. cloning). No explicit exclusion or comparison to siblings.

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