Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.neuraldraft.io/llms.txt

Use this file to discover all available pages before exploring further.

This is the reference the AI sees through the MCP protocol. The exact same information is included in the server’s responses to resources/list, tools/list, and prompts/list, so a curious model can rediscover all of this at runtime.

Resources

Resources are read-only context. The AI fetches them once per session — they don’t take parameters and they don’t have side effects.

brand://current

The single source of truth for your project’s brand. The first thing the AI should read in any UI generation session.
{
  "voice": "friendly_professional",
  "audience": "indie founders building with AI tools",
  "industry": "software",
  "colors": {
    "primary": "#7C3AED",
    "secondary": "#0F172A",
    "accent": "#A78BFA"
  },
  "fonts": {
    "heading": "Inter",
    "body": "Inter"
  },
  "default_language": "en",
  "target_languages": ["en", "fr", "de"]
}
Backed by GET /v1/brand. Refresh in a long session by re-reading the resource.

schema://blog-post

JSON Schema for Post and PostTranslation. The AI reads it before generating a /blog page so the rendered markup matches what the API returns.
{
  "type": "object",
  "required": ["id", "slug", "status", "title"],
  "properties": {
    "id": { "type": "integer" },
    "slug": { "type": "string" },
    "status": { "enum": ["draft", "published", "scheduled", "archived"] },
    "featured_image": { "type": ["string", "null"], "format": "uri" },
    "published_at": { "type": ["string", "null"], "format": "date-time" },
    "title": { "type": "string" },
    "excerpt": { "type": ["string", "null"] },
    "content": { "type": "string", "description": "HTML body" },
    "language_code": { "type": "string" },
    "category": { "$ref": "#/definitions/Category" },
    "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" } }
  }
}

schema://product

JSON Schema for Product and ProductVariant. Drives storefront page generation and product-card components.

schema://booking

JSON Schema for BookableService, BookingAvailability, and Booking. Drives booking flow generation.

conventions://editable-html

The most important resource. A short markdown doc describing the markup rules the AI must follow to make generated sections editable in the project’s admin.
# Neural Draft editable-HTML conventions

Every generated section MUST follow these rules so the customer's admin can
edit it without touching code.

## Text
- Wrap any human-visible text node with data-translate="<key>":
  <h1 data-translate="hero.headline">Welcome</h1>
- Keys are dot-namespaced: section.field
  e.g. hero.headline, pricing.tiers.0.title

## Images
- <img data-image-key="hero.background" src="..." alt="...">
- The customer can swap in admin; the CDN URL resolves server-side.

## Calls to Neural Draft
- Read content: GET /v1/content/{key}?lang={locale}
- Bulk: GET /v1/content/bulk?keys=a,b,c&lang=en
- Use @neuraldraft/sdk for runtime fetches.

conventions://api-usage

REST patterns: how auth headers work, error envelope shape, the async-job contract, idempotency. The AI uses this when generating server-side code that calls Neural Draft.

Tools

Tools have side effects. Each one wraps a real call to the v1 Project API.

register_component

The AI calls this for every section it generates. The component appears in your admin as editable, with data-translate keys discovered automatically.
{
  "name": "register_component",
  "input": {
    "html": "<section data-component=\"hero\"><h1 data-translate=\"hero.headline\">Welcome</h1></section>",
    "intent": "marketing hero",
    "section_type": "hero"
  },
  "output": {
    "component_id": "cmp_2NgcaXxFqLPo",
    "editor_url": "https://app.neuraldraft.io/components/cmp_2NgcaXxFqLPo",
    "keys_created": ["hero.headline"]
  }
}
ParamTypeRequired
htmlstring — full section markup with data-translate / data-image-key attrsYes
intentstring — short description of the section’s purposeYes
section_typeenum: hero, features, pricing, cta, footer, testimonials, gallery, otherNo
Backs onto POST /v1/components/register.

create_translation_keys

Bulk-create translation key namespaces. Useful when the AI is about to emit a component with many keys and wants to seed each with default per-language values.
{
  "name": "create_translation_keys",
  "input": {
    "keys": [
      { "key": "hero.headline", "value": "Welcome", "lang": "en" },
      { "key": "hero.subhead", "value": "We build software that scales.", "lang": "en" }
    ]
  },
  "output": { "created": 2 }
}

generate_blog_post

Kick off the full blog generation pipeline. Returns a job id; poll or stream.
{
  "name": "generate_blog_post",
  "input": {
    "topic": "How to choose a CMS for AI-built sites",
    "tone": "friendly_professional",
    "length": "medium",
    "translate_to_all_languages": true
  },
  "output": {
    "job_id": "job_2NgcaXxFqLPo",
    "status_url": "https://api.neuraldraft.io/v1/jobs/job_2NgcaXxFqLPo",
    "estimated_credits": 400
  }
}

generate_image

Brand-consistent image generation. Returns a job id; poll for the URL.
{
  "name": "generate_image",
  "input": {
    "prompt": "A founder typing on a laptop in a sunlit cafe, soft focus",
    "aspect_ratio": "16:9",
    "key": "hero.background"
  },
  "output": {
    "job_id": "job_2Nh4PqRsTuVw",
    "status_url": "https://api.neuraldraft.io/v1/jobs/job_2Nh4PqRsTuVw"
  }
}

connect_social_account

Returns the OAuth URL the AI surfaces to the user. They click, authorize, return; the AI can then call social_post.publish.
{
  "name": "connect_social_account",
  "input": { "platform": "instagram" },
  "output": {
    "oauth_url": "https://app.neuraldraft.io/oauth/instagram?state=...",
    "expires_in": 600
  }
}

list_products / get_product

Reads. The AI uses these when generating a product-grid or product-detail page so the rendered fields match real data.

setup_booking_widget

Returns the embed snippet for a service. The AI inserts it into the page.
{
  "name": "setup_booking_widget",
  "input": { "service_id": 42, "theme": "auto" },
  "output": {
    "snippet": "<div data-nd-widget=\"booking\" data-service-id=\"42\"></div>\n<script src=\"https://widgets.neuraldraft.io/v1/booking.js\" defer></script>",
    "embed_url": "https://embed.neuraldraft.io/booking/42"
  }
}

create_bookable_service

Create a service customers can book. Two modes — both share the same tool; pick booking_type to switch:
  • time_slot (default) — meeting / appointment style with duration_minutes, buffer_before_minutes, buffer_after_minutes, max_bookings_per_slot.
  • date_range — apartment / rental style with min_nights, max_nights.
{
  "name": "create_bookable_service",
  "input": {
    "name": "Cozy beach apartment",
    "booking_type": "date_range",
    "price": 15000,
    "currency": "eur",
    "min_nights": 2,
    "max_nights": 14
  }
}
After creation, call setup_booking_widget with the returned service_id.

Pages — create_page / list_pages / get_page / update_page

Multi-page authoring with per-page SEO meta. Call create_page once per page before registering its components if you want a real meta_title / meta_description. If you skip it, register_component auto-creates a stub page that you can backfill via update_page.
{
  "name": "create_page",
  "input": {
    "slug": "about",
    "title": "About us",
    "meta_title": "About — Acme",
    "meta_description": "Built for makers who hate boilerplate.",
    "og_image": "https://cdn.example.com/og.png"
  }
}
update_page uses merge semantics — only the fields you pass are overwritten, the rest are preserved. Pass null to clear a meta field.

generate_video

Short-form clip generation. Returns a Job; poll get_job until complete. Two tiers — pick budget (default, Wan 2.1) for 40 credits or premium (Kling v2.1 / Runway Gen4) for 300 credits. Premium requires a Build plan or higher; Free / Hobby calling with tier=premium get 402 plan_required.
{
  "name": "generate_video",
  "input": {
    "prompt": "slow-mo pour-over coffee, warm morning light, cinematic",
    "aspect_ratio": "9:16",
    "duration_seconds": 5,
    "tier": "budget"
  }
}

list_newsletter_subscribers / list_contact_form_submissions

Read-only listings of the project’s captured leads. Both support page, page_size (max 200) and search (substring match against email + subject
  • message). The newsletter listing also accepts an app_lead boolean to filter trial leads from real subscribers.
{
  "name": "list_contact_form_submissions",
  "input": { "page": 1, "page_size": 50, "search": "demo" }
}
Submissions are written to the project from the public v1 endpoints (POST /v1/newsletters/subscribe, POST /v1/contact-forms) which fire newsletter.subscribed / contact_form.submitted webhook events. These tools don’t write — they’re for the AI to inspect what came in.

Prompts (slash commands)

Prompts are user-invoked. They expand into a long instruction the AI then executes — like a parameterised macro.

/scaffold-marketing-site

Generates a full Lovable/Next.js/Astro/Nuxt marketing site whose content lives in Neural Draft.
ArgumentNotes
frameworknext | astro | sveltekit | nuxt
pagesComma-separated, e.g. home,about,pricing,contact
The expanded prompt instructs the AI to:
  1. Read brand://current and apply colors/fonts/voice.
  2. Read conventions://editable-html and follow the markup rules.
  3. Read schema://blog-post if generating a /blog route.
  4. Generate the requested pages.
  5. For every section, call register_component so the customer admin shows them as editable.
  6. Use @neuraldraft/sdk for runtime fetches; print the editor_url for each section.

/scaffold-blog-page

Drops a blog index + dynamic post page into the current project. Reads schema://blog-post and renders an SSG-friendly page that fetches via the v1 API.

/connect-existing-site

For static sites that already exist. Replaces hardcoded text with {{ __('key') }}-style fetches and adds data-translate attributes so the admin editor works.

/add-booking-widget

Single-flow embed: AI calls list_services, asks the user to pick one, calls setup_booking_widget, then drops the snippet into the right place in the page.

Annotations

Each tool advertises MCP annotations so smart clients can surface confirm-prompts before destructive ops:
ToolreadOnlydestructiveidempotent
register_component
create_translation_keys
generate_blog_post
generate_image
connect_social_account
list_products
get_product
setup_booking_widget

Observability

Every tool call is logged in your project’s audit log under the synthetic agent mcp:<machine-name>. The dashboard’s “MCP usage” pane shows the most common tool/resource calls and tail latency, so you can spot a misbehaving session.

Source

The MCP server ships as the @neuraldraft/mcp npm package; source lives at github.com/vbalagovic/neuraldraft-mcp. File issues there. We follow SemVer; non-breaking additions are normal.