[{"data":1,"prerenderedAt":674},["ShallowReactive",2],{"guide-\u002Fdocs\u002Fguides\u002Fai-mcp\u002Ftools-reference":3,"guides-all":603},{"id":4,"title":5,"body":6,"category":592,"description":593,"extension":594,"icon":595,"meta":596,"navigation":597,"order":598,"path":599,"seo":600,"stem":601,"__hash__":602},"guides\u002Fdocs\u002Fguides\u002Fai-mcp\u002Ftools-reference.md","MCP tools reference",{"type":7,"value":8,"toc":584},"minimark",[9,13,22,29,32,38,48,53,59,64,75,79,120,134,138,143,147,154,158,221,233,238,294,298,306,311,314,318,326,330,335,340,347,351,355,489,493,498,502,505,549,580],[10,11,5],"h1",{"id":12},"mcp-tools-reference",[14,15,16,17,21],"p",{},"The Transactional MCP server exposes ",[18,19,20],"strong",{},"five"," tools. All calls are scoped to the API token used at connection time — the assistant only ever sees that account's documents.",[23,24,26],"h2",{"id":25},"list_documents",[27,28,25],"code",{},[14,30,31],{},"List the templates owned by the connected account. Use this first when the assistant doesn't yet know what's available.",[14,33,34,37],{},[18,35,36],{},"Arguments"," — none.",[14,39,40,43,44,47],{},[18,41,42],{},"Returns"," — an array of ",[27,45,46],{},"{ id, uuid, name, framework, format, updatedAt }",".",[14,49,50],{},[18,51,52],{},"Trigger prompts",[54,55,56],"blockquote",{},[14,57,58],{},"\"What templates do I have on Transactional?\"\n\"List my Transactional documents.\"",[23,60,62],{"id":61},"get_document",[27,63,61],{},[14,65,66,67,70,71,74],{},"Fetch the full state of one document. Use this before ",[27,68,69],{},"generate_pdf"," so the assistant knows the exact shape of ",[27,72,73],{},"variables"," to send.",[14,76,77],{},[18,78,36],{},[80,81,82,98],"table",{},[83,84,85],"thead",{},[86,87,88,92,95],"tr",{},[89,90,91],"th",{},"Name",[89,93,94],{},"Type",[89,96,97],{},"Notes",[99,100,101],"tbody",{},[86,102,103,109,114],{},[104,105,106],"td",{},[27,107,108],{},"id",[104,110,111],{},[27,112,113],{},"integer",[104,115,116,117,119],{},"Internal id from ",[27,118,25],{},". UUIDs are not accepted here.",[14,121,122,124,125,128,129,131,132,47],{},[18,123,42],{}," — ",[27,126,127],{},"{ uuid, name, body, framework, format, landscape, fonts, variables, updatedAt }",". The ",[27,130,73],{}," field holds the sample shape — use it as a template when calling ",[27,133,69],{},[14,135,136],{},[18,137,52],{},[54,139,140],{},[14,141,142],{},"\"Show me the variables the invoice template expects.\"\n\"Get template 12.\"",[23,144,145],{"id":69},[27,146,69],{},[14,148,149,150,153],{},"Render a document with the supplied variables. Debits ",[18,151,152],{},"one generation credit"," per successful call.",[14,155,156],{},[18,157,36],{},[80,159,160,173],{},[83,161,162],{},[86,163,164,166,168,171],{},[89,165,91],{},[89,167,94],{},[89,169,170],{},"Required",[89,172,97],{},[99,174,175,202],{},[86,176,177,182,187,190],{},[104,178,179],{},[27,180,181],{},"documentId",[104,183,184],{},[27,185,186],{},"string (uuid)",[104,188,189],{},"yes",[104,191,192,193,196,197,199,200,47],{},"The ",[27,194,195],{},"uuid"," from ",[27,198,25],{}," \u002F ",[27,201,61],{},[86,203,204,208,213,216],{},[104,205,206],{},[27,207,73],{},[104,209,210],{},[27,211,212],{},"object",[104,214,215],{},"no",[104,217,218,219,47],{},"Handlebars context. Must match the shape from ",[27,220,61],{},[14,222,223,124,225,228,229,232],{},[18,224,42],{},[27,226,227],{},"{ url, documentId }",". ",[27,230,231],{},"url"," is signed and short-lived (download it fast).",[14,234,235],{},[18,236,237],{},"Errors the assistant may surface",[80,239,240,252],{},[83,241,242],{},[86,243,244,249],{},[89,245,246],{},[27,247,248],{},"error",[89,250,251],{},"Meaning",[99,253,254,264,274,284],{},[86,255,256,261],{},[104,257,258],{},[27,259,260],{},"invalid_document_id",[104,262,263],{},"UUID is malformed.",[86,265,266,271],{},[104,267,268],{},[27,269,270],{},"NOT_FOUND",[104,272,273],{},"Document doesn't exist or isn't owned by this token.",[86,275,276,281],{},[104,277,278],{},[27,279,280],{},"quota_exceeded",[104,282,283],{},"Out of generation credits — top up.",[86,285,286,291],{},[104,287,288],{},[27,289,290],{},"storage_unavailable",[104,292,293],{},"S3 hiccup. Retry once.",[14,295,296],{},[18,297,52],{},[54,299,300],{},[14,301,302,303],{},"\"Generate the invoice PDF for Acme Corp.\"\n\"Render template ",[195,304,305],{}," with customer = { name: 'X' }.\"",[23,307,309],{"id":308},"list_folders",[27,310,308],{},[14,312,313],{},"List the folders organizing the account's documents. Optional context for the assistant; not required for generation.",[14,315,316,37],{},[18,317,36],{},[14,319,320,124,322,325],{},[18,321,42],{},[27,323,324],{},"{ id, name, createdAt, updatedAt }[]",", sorted alphabetically.",[14,327,328],{},[18,329,52],{},[54,331,332],{},[14,333,334],{},"\"What folders do I have in Transactional?\"\n\"Group my templates by folder.\"",[23,336,338],{"id":337},"get_usage",[27,339,337],{},[14,341,342,343,346],{},"Read the current credit snapshot — generation and AI counters with ",[27,344,345],{},"used \u002F included \u002F topUp \u002F remaining"," plus the period end.",[14,348,349,37],{},[18,350,36],{},[14,352,353],{},[18,354,42],{},[356,357,362],"pre",{"className":358,"code":359,"language":360,"meta":361,"style":361},"language-json shiki shiki-themes github-light github-dark","{\n  \"generation\": { \"used\": 482, \"included\": 1000, \"topUp\": 0, \"remaining\": 518 },\n  \"ai\":         { \"used\":  31, \"included\":  100, \"topUp\": 0, \"remaining\":  69 },\n  \"periodEnd\":  \"2026-06-01T00:00:00.000Z\"\n}\n","json","",[27,363,364,373,426,471,483],{"__ignoreMap":361},[365,366,369],"span",{"class":367,"line":368},"line",1,[365,370,372],{"class":371},"sVt8B","{\n",[365,374,376,380,383,386,389,392,395,398,400,403,405,408,410,413,415,418,420,423],{"class":367,"line":375},2,[365,377,379],{"class":378},"sj4cs","  \"generation\"",[365,381,382],{"class":371},": { ",[365,384,385],{"class":378},"\"used\"",[365,387,388],{"class":371},": ",[365,390,391],{"class":378},"482",[365,393,394],{"class":371},", ",[365,396,397],{"class":378},"\"included\"",[365,399,388],{"class":371},[365,401,402],{"class":378},"1000",[365,404,394],{"class":371},[365,406,407],{"class":378},"\"topUp\"",[365,409,388],{"class":371},[365,411,412],{"class":378},"0",[365,414,394],{"class":371},[365,416,417],{"class":378},"\"remaining\"",[365,419,388],{"class":371},[365,421,422],{"class":378},"518",[365,424,425],{"class":371}," },\n",[365,427,429,432,435,437,440,443,445,447,449,452,454,456,458,460,462,464,466,469],{"class":367,"line":428},3,[365,430,431],{"class":378},"  \"ai\"",[365,433,434],{"class":371},":         { ",[365,436,385],{"class":378},[365,438,439],{"class":371},":  ",[365,441,442],{"class":378},"31",[365,444,394],{"class":371},[365,446,397],{"class":378},[365,448,439],{"class":371},[365,450,451],{"class":378},"100",[365,453,394],{"class":371},[365,455,407],{"class":378},[365,457,388],{"class":371},[365,459,412],{"class":378},[365,461,394],{"class":371},[365,463,417],{"class":378},[365,465,439],{"class":371},[365,467,468],{"class":378},"69",[365,470,425],{"class":371},[365,472,474,477,479],{"class":367,"line":473},4,[365,475,476],{"class":378},"  \"periodEnd\"",[365,478,439],{"class":371},[365,480,482],{"class":481},"sZZnC","\"2026-06-01T00:00:00.000Z\"\n",[365,484,486],{"class":367,"line":485},5,[365,487,488],{"class":371},"}\n",[14,490,491],{},[18,492,52],{},[54,494,495],{},[14,496,497],{},"\"How many PDFs can I still generate this month?\"\n\"Show me my Transactional credits.\"",[23,499,501],{"id":500},"patterns-the-assistant-should-follow","Patterns the assistant should follow",[14,503,504],{},"A few habits worth nudging into the system prompt if you're building your own assistant on top of these tools:",[506,507,508,521,532,541],"ol",{},[509,510,511,520],"li",{},[18,512,513,515,516,515,518,47],{},[27,514,25],{}," before ",[27,517,61],{},[27,519,69],{}," Don't guess UUIDs.",[509,522,523,531],{},[18,524,525,526,196,528,530],{},"Read ",[27,527,73],{},[27,529,61],{}," and reuse its shape."," Inventing variable names is the #1 source of broken PDFs.",[509,533,534,540],{},[18,535,536,537,539],{},"Surface ",[27,538,248],{}," codes verbatim."," They're stable and let users branch programmatically — don't paraphrase.",[509,542,543,548],{},[18,544,545,546,47],{},"Don't loop on ",[27,547,280],{}," It won't fix itself within a turn; tell the user to top up.",[550,551,564],"aside",{"className":552},[553,554,555,556,557,558,559,560,561,562,563],"not-prose","my-6","rounded-md","border","border-blue-200","bg-blue-50","text-blue-900","px-4","py-3","text-[14px]","leading-relaxed",[14,565,566,569,570,572,573,575,576,579],{},[18,567,568],{},"Want to verify your own assistant uses the tools well?"," Add ",[27,571,337],{}," calls before and after a ",[27,574,69],{}," and check that ",[27,577,578],{},"remaining"," decreased by exactly 1. That's the cheapest end-to-end smoke test.",[581,582,583],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":361,"searchDepth":375,"depth":375,"links":585},[586,587,588,589,590,591],{"id":25,"depth":375,"text":25},{"id":61,"depth":375,"text":61},{"id":69,"depth":375,"text":69},{"id":308,"depth":375,"text":308},{"id":337,"depth":375,"text":337},{"id":500,"depth":375,"text":501},"ai-mcp","Every tool the Transactional MCP server exposes, with arguments, return shapes, and a prompt that typically triggers each one.","md","list",{},true,7,"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Ftools-reference",{"title":5,"description":593},"docs\u002Fguides\u002Fai-mcp\u002Ftools-reference","A0a5foOSfSkb2f21XdiHMXW9LbOuycsRA8GL0MfrK9s",[604,608,612,616,620,625,626,630,635,639,643,647,652,657,661,665,670],{"path":605,"title":606,"description":607,"category":592,"order":485},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fchatgpt","ChatGPT (via Custom GPT Actions)","ChatGPT doesn't speak MCP natively yet — but you can give it the same powers through a Custom GPT pointed at the Transactional REST API.",{"path":609,"title":610,"description":611,"category":592,"order":428},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fclaude-code","Claude Code (CLI)","Connect Transactional to Claude Code so it can read your templates and generate PDFs from your terminal.",{"path":613,"title":614,"description":615,"category":592,"order":375},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fclaude-desktop","Claude Desktop","Connect Transactional to Claude Desktop on macOS or Windows so Claude can read your templates and generate PDFs.",{"path":617,"title":618,"description":619,"category":592,"order":473},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fcursor","Cursor","Wire Transactional into Cursor's MCP support so you can generate PDFs from inside your editor.",{"path":621,"title":622,"description":623,"category":592,"order":624},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fgemini","Gemini Code Assist \u002F Gemini CLI","Connect Transactional to Google's Gemini agents through their MCP support.",6,{"path":599,"title":5,"description":593,"category":592,"order":598},{"path":627,"title":628,"description":629,"category":592,"order":368},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fuse-from-ai","Use Transactional from your AI assistant","Connect Transactional to Claude, Cursor, ChatGPT, or Gemini via MCP so your assistant can read your templates and generate PDFs directly.",{"path":631,"title":632,"description":633,"category":634,"order":375},"\u002Fdocs\u002Fguides\u002Fauthoring\u002Fdesign-for-pdf","Designing templates that survive PDF rendering","PDFs are static — drop the animations, oversample your canvas charts, lean on vectors. The rules that make a template look sharp at print resolution.","authoring",{"path":636,"title":637,"description":638,"category":634,"order":368},"\u002Fdocs\u002Fguides\u002Fauthoring\u002Fhandlebars","Handlebars cheat sheet","The exact subset of Handlebars supported in Transactional templates — variables, conditionals, loops, and what NOT to reach for.",{"path":640,"title":641,"description":642,"category":634,"order":428},"\u002Fdocs\u002Fguides\u002Fauthoring\u002Fmodeling-variables","Modeling your variables","When to make something a variable vs. inline. Keep the API contract small, your templates portable, and your integration code boring.",{"path":644,"title":645,"description":646,"category":634,"order":473},"\u002Fdocs\u002Fguides\u002Fauthoring\u002Fworking-with-ai","Working with the AI assistant","Prompts and patterns to get good templates fast — what to ask, when to iterate, when to start over.",{"path":648,"title":649,"description":650,"category":651,"order":368},"\u002Fdocs\u002Fguides\u002Fgetting-started\u002Fquickstart","Quickstart — your first PDF in 5 minutes","Sign up, design a template, render your first PDF through the API. End-to-end in five minutes.","getting-started",{"path":653,"title":654,"description":655,"category":656,"order":368},"\u002Fdocs\u002Fguides\u002Fintegrations\u002Fnode-bun","Calling \u002Fv1\u002Fgenerate from Node.js & Bun","Production-grade integration using native fetch — retries, error handling, streaming the PDF to your storage.","integrations",{"path":658,"title":659,"description":660,"category":656,"order":375},"\u002Fdocs\u002Fguides\u002Fintegrations\u002Fphp-laravel","Calling \u002Fv1\u002Fgenerate from PHP & Laravel","cURL extension, Guzzle, or Laravel's HTTP client — render PDFs with retries and proper error handling.",{"path":662,"title":663,"description":664,"category":656,"order":428},"\u002Fdocs\u002Fguides\u002Fintegrations\u002Fpython","Calling \u002Fv1\u002Fgenerate from Python","urllib (stdlib), requests, or httpx with retry — render PDFs from Django, FastAPI, or any Python service.",{"path":666,"title":667,"description":668,"category":669,"order":368},"\u002Fdocs\u002Fguides\u002Foperations\u002Fmonitoring-usage","Monitoring usage & credits","Read the dashboard gauges, set sane alerts, and decide when to top up vs. upgrade.","operations",{"path":671,"title":672,"description":673,"category":669,"order":375},"\u002Fdocs\u002Fguides\u002Foperations\u002Fstoring-pdfs","Storing & serving the generated PDF","The \u002Fv1\u002Fgenerate URL is signed and short-lived. Patterns for keeping the PDF around — your bucket, your CDN, your DB.",1780347733848]