Create a lead magnet draft
create_lead_magnetMake a PRIVATE draft lead magnet from one of the user's ebooks: Unplain renders the saved ebook to a PDF once and sets up its landing page. Nothing is public until publish_lead_magnet. A lead magnet is the PUBLISHED form of an ebook: a PDF snapshot of the saved ebook plus a landing page with an email form on the workspace's Library (https://.unplain.page). Editing the ebook never changes the public PDF until it is refreshed. The plan's export terms apply (on Free, any length, with the “Made with Unplain” credit). Returns the draft's readiness; show the user its title, description and readiness before publishing.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>"
},
"name": "create_lead_magnet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | The page's path under the Library: lowercase letters, numbers and single hyphens, up to 60 characters. Defaults to one made from the title. | |
| title | No | The landing page's title. | |
| featured | No | Show it first on the Library (one per Library). | |
| headline | No | The line under the title; also the search result title when set. | |
| projectId | Yes | The ebook to publish, from list_ebooks. | |
| emailGuide | No | Also email the reader a copy (default true). | |
| consentText | No | The consent sentence beside the required checkbox. Omit to keep Unplain's default sentence. | |
| description | No | What the reader gets and why; shown on the page and in search results. | |
| whatsInside | No | Up to 5 short lines for "What's inside"; null lets Unplain pick them from the PDF. | |
| allowSharing | No | Let readers make share links for colleagues. | |
| nameRequired | No | Ask for a name as well as the email. | |
| showOnLibrary | No | List it on the Library page (false = reachable only by its link). | |
| idempotencyKey | No | Any unique string; repeating the call with the same key returns the same draft instead of a copy. |