--- name: ghostbakery description: "Create synthetic test data with Ghost Bakery: draft GBDDL recipes, validate and preview them, check credit costs, submit authorized jobs and retrieve results through MCP or the HTTP API. Use for Ghost Bakery data, catalog and filler PDF requests." --- # Ghost Bakery Turn the user's data requirements into a GBDDL recipe and, when connected and authorized, a downloadable result. GBDDL is the recipe language; canonical JSON is an alternative representation of the same model. ## Discover before authoring Read the relevant current reference instead of guessing generator names, arguments, constraints or output options: - Complete documentation: https://ghostbakery.com/llms-full.txt - Recipe language: https://ghostbakery.com/docs/reference/recipe - Smart types: https://ghostbakery.com/docs/reference/field-types - Output formats: https://ghostbakery.com/docs/reference/output-formats - Credits: https://ghostbakery.com/docs/reference/credits - MCP connection and tools: https://ghostbakery.com/docs/ai/mcp - Private samples: https://ghostbakery.com/docs/guides/private-samples - HTTP API workflow: https://ghostbakery.com/docs/reference/api - Live API contract: https://api.ghostbakery.com/openapi.json When Ghost Bakery MCP tools are available, use `ghostbakery_get_reference` for relevant types and current limits. The server may expose read-only resources at `ghostbakery://reference` and `ghostbakery://examples/`; use examples as starting points, not as a substitute for the user's requirements. ## Prepare a recipe Infer sensible defaults for minor choices. Ask about missing requirements only when they materially affect the result, such as row counts, relationships, output format or spending limits. Prefer small previews when exploring. Represent entities as tables with explicit keys and relationships. Use supported smart types for realistic values, and choose an output block matching the requested file or scenario format. Preserve Unicode. Check the reference for exact syntax before introducing a construct. If the user supplies sample JSON, CSV or TSV, `ghostbakery_infer_recipe` can produce a starting recipe. Review inferred types and relationships. Inference uses column names and value shapes and never copies sample values into the recipe. The local MCP server cuts the sample to 20 rows and canonicalizes values on the user's machine before sending; remote MCP receives what the caller sends, so prefer the local server for sensitive samples, or canonicalize them and send only a few rows. When the user offers production or personal data over the remote server, say so before sending it and suggest Chef or the local server; never paste such data into a recipe, a preview or any other tool. Column names and JSON keys are always sent as written. If an assistant can inspect an SQL schema, translate it into GBDDL using the documented types; do not assume a server-side SQL import tool exists. Without callable MCP tools or an authenticated HTTP client, deliver the recipe for validation in Chef. State that it has not been validated or generated. Reading documentation alone does not execute Ghost Bakery operations. ## Validate, preview and quote Use `ghostbakery_validate_recipe` and inspect validation errors even when the transport succeeds. Fix errors before generation. Use `ghostbakery_preview_recipe` to check representative values and relationships; validation and preview are free. If preview or inference returns a pending identifier, poll `ghostbakery_get_preview` or `ghostbakery_get_inference` as appropriate. Use the returned credit quote and current limits. Recipe pricing is `max(1, sum(table rows * sum(column weights)))` with effective policy weights; catalogs and PDFs have separate pricing. Revalidate after changing a recipe or its inputs. Respect the user's existing authorization and credit ceiling. If the quote exceeds that ceiling, reduce scope with their agreement or ask for a higher ceiling before submitting. When spending has not been authorized, present the concrete recipe and quote for approval. ## Generate and retrieve Submit an authorized recipe with `ghostbakery_generate`, passing `max_cost` from the validated quote within the user's ceiling. Use `input_format=gbddl` for text or `json` for canonical JSON according to the tool schema. Poll `ghostbakery_get_job` until `completed`, `failed` or `expired`. Honor retry guidance; report failures instead of claiming success. A `held` job stopped on our side: its credits stay charged and it keeps its inputs until `hold_expires_at`; offer `ghostbakery_retry_job` (free) or `ghostbakery_cancel_job` (refunds), and do not resubmit. Use `ghostbakery_list_jobs` to find earlier results when appropriate. Give the user the returned download URL and any authentication or expiry note. Fetch generated files only when the user's task requires inspecting or saving them. Report `reused`, `outcome` and the actual credits charged. An identical request may return an existing result without generating or charging again. Set `regenerate` only when the user wants fresh data and authorizes the new charge. A result that is no longer stored can require a paid new run; do not describe every retry as free. For HTTP access, consult the live contract, send the required `input_format`, use `X-Max-Cost` for job submission, and follow the documented status and download endpoints. Use configured credentials without exposing them in recipes, conversation or output. Do not ask users to paste API keys into chat. ## Separate workflows Catalog exports and localized filler PDFs do not need a recipe. Discover catalog options with `ghostbakery_list_catalog`; use `ghostbakery_export_catalog` for supported exports and `ghostbakery_create_pdf` for PDFs. Check their current pricing, limits and input schemas, and apply the same authorization and result-reuse rules. Saving or deleting recipes, purchasing credits and running paid generation are separate actions. Perform only those requested or already authorized. `ghostbakery_buy_credits` can provide a checkout link when requested; the user completes payment.