marketo_clone_form
Clone a Marketo form into a specified folder, creating a draft that requires approval before use.
Instructions
Clone an existing form into a destination folder. The cloned form is created in draft status and must be approved before use.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formId | Yes | ||
| name | Yes | ||
| description | No | ||
| folderId | Yes |
Implementation Reference
- src/index.ts:115-126 (handler)The handler function that executes the 'marketo_clone_form' tool logic. It calls makeApiRequest to POST to /asset/v1/form/{formId}/clone.json with the name, description, and folder as form-urlencoded data.
tool(async ({ formId, name, description, folderId }) => makeApiRequest( `/asset/v1/form/${formId}/clone.json`, 'POST', { name, description, folder: JSON.stringify({ id: folderId, type: 'Folder' }), }, 'application/x-www-form-urlencoded' ) ) - src/index.ts:109-113 (schema)Zod schema defining the input parameters for marketo_clone_form: formId (number), name (string), description (optional string), and folderId (number).
{ formId: z.number(), name: z.string(), description: z.string().optional(), folderId: z.number(), - src/index.ts:106-127 (registration)Registration of the 'marketo_clone_form' tool on the MCP server using server.tool(), with name, description, schema, and handler.
server.tool( 'marketo_clone_form', 'Clone an existing form into a destination folder. The cloned form is created in draft status and must be approved before use.', { formId: z.number(), name: z.string(), description: z.string().optional(), folderId: z.number(), }, tool(async ({ formId, name, description, folderId }) => makeApiRequest( `/asset/v1/form/${formId}/clone.json`, 'POST', { name, description, folder: JSON.stringify({ id: folderId, type: 'Folder' }), }, 'application/x-www-form-urlencoded' ) ) );