Skip to main content
Glama

marketo_clone_form

Clone a Marketo form with all fields and settings intact. Specify a new name, destination folder, and optional description to create an identical copy.

Instructions

Clone an existing Marketo form. Creates a new form with the same fields and settings under the specified name and folder.

Input Schema

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

Implementation Reference

  • The handler function for marketo_clone_form. Accepts id, name, folderId, folderType, and optional description. Makes a POST request to /rest/asset/v1/form/{id}/clone.json with the form data as x-www-form-urlencoded.
      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/form/${args.id}/clone.json`,
            "POST",
            body,
            "application/x-www-form-urlencoded"
          ));
        } catch (e) { return err(e); }
      }
    );
  • Input schema for marketo_clone_form using Zod: id (number), name (string), folderId (number), folderType (enum 'Folder'|'Program', default 'Folder'), description (optional string).
    {
      id: z.number().describe("ID of the form to clone"),
      name: z.string().describe("Name for the cloned form"),
      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 form"),
    },
  • Registration of the 'marketo_clone_form' tool via server.tool(), with description and schema, inside registerFormTools() function.
    // ── marketo_clone_form ─────────────────────────────────────────────────────
    server.tool(
      "marketo_clone_form",
      "Clone an existing Marketo form. Creates a new form with the same fields and settings under the specified name and folder.",
      {
        id: z.number().describe("ID of the form to clone"),
        name: z.string().describe("Name for the cloned form"),
        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 form"),
      },
      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/form/${args.id}/clone.json`,
            "POST",
            body,
            "application/x-www-form-urlencoded"
          ));
        } catch (e) { return err(e); }
      }
    );
  • The makeRequest helper used by the handler to send authenticated HTTP requests to the Marketo Asset API.
    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/tools/forms.ts:5-9 (registration)
    The registerFormTools function that registers all form-related tools, including marketo_clone_form, onto the MCP server.
    export function registerFormTools(server: McpServer) {
      // ── marketo_get_forms ──────────────────────────────────────────────────────
      server.tool(
        "marketo_get_forms",
        "List forms in Marketo. Supports pagination via maxReturn (max 200) and offset. Optionally filter by status (approved/draft). Returns form metadata including name, URL, status, and folder.",
Behavior2/5

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

No annotations are provided, so the description must fully convey behavioral traits. It states that a new form is created, implying a non-destructive copy, but lacks details on permissions, rate limits, or side effects. The minimal description does not sufficiently cover behavioral aspects beyond the basic operation.

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 two sentences, directly stating the purpose and key action. It is concise with no extraneous information, and the verb 'Clone' is front-loaded for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema and annotations, the description provides the essential function but omits details on return values, error handling, or folder type nuances (e.g., Folder vs. Program). It is minimally complete for a straightforward clone operation but could be more robust.

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 input schema has 100% description coverage, so the baseline is 3. The description adds little beyond the schema, only mentioning that the form is created 'under the specified name and folder', which corresponds to parameters already documented. No extra semantic value is provided.

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 verb 'Clone' and the resource 'existing Marketo form', specifying that it creates a new form with identical fields and settings under a given name and folder. This distinguishes it from sibling clone tools like marketo_clone_email or marketo_clone_landing_page.

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 the tool (to clone a form) but does not explicitly compare it to alternatives or state when not to use it. Given the specific name and context, the usage is clear but lacks explicit guidance on exclusions or alternative 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