campaignstack_preview_craft_prompt
Render the exact prompt a craft node would send for one lead, without sending it. Call this when the user asks to see what a draft would look like, or to debug why a node's wording keeps going wrong. Runs the real craft path and stops immediately before the model call, so what comes back is the same bytes the model would read. index lists the named blocks in the system prompt with their character offsets and sizes (COMPANY CONTEXT, WHAT WE WANT, the playbook sections, RED LINES, the voice), which is how you find out WHICH piece of configuration produces a phrase you do not want. Writes no audit row, records no AI usage, assigns no voice experiment arm, fetches no web context, and costs nothing. Pair it with campaignstack_get_craft_config_tree, which shows where each block comes from.
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": {
"workflowId": "<workflowId>",
"nodeId": "<nodeId>",
"leadId": "<leadId>"
},
"name": "campaignstack_preview_craft_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| leadId | Yes | The lead to render the prompt for. Different leads produce different prompts. | |
| nodeId | Yes | A craft node: ai:craft_note, ai:craft_message, ai:craft_comment, ai:reply_conversation, ai:craft_email, or a send node in its AI mode. | |
| include | No | What to return. Default: index and user. The system prompt runs to thousands of characters, so ask for it when you are going to read it. | |
| leadSource | No | Optional. Leave it out: the server reads it from the leadId and refuses a value that disagrees. | |
| workflowId | Yes | The workflow the node belongs to. | |
| workspaceId | No | Workspace ID. Omit it when this connection reaches one workspace: a workspace key (cs_) is bound to its own, and a user key (csu_) or connected app whose person belongs to exactly one workspace defaults to that one. Required only when the person belongs to several; the error then lists them, and campaignstack_whoami reports them too. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chars | No | ||
| index | No | ||
| caller | No | ||
| nodeType | No | ||
| userPrompt | No | ||
| systemPrompt | No |