# Build and revise a complete site

Ask your agent to build a site, edit its pages, and manage blog posts.

## Ask for a site in one conversation

A generation brief that explicitly asks for a full site can return siteTask. Follow that existing task instead of submitting a duplicate. For an existing homepage, send one site_task_start message. It binds the owned homepage and current facts, plans the necessary pages, and builds them using automatic credit admission. Pass autoPublish:true with pages:publish authority to publish the complete final site automatically; otherwise use the explicit site release commands.

[site_task_start](/api-reference#site_task_start) · MCP / client input

```json
{
  "body": {
    "homepageGenerationId": "11111111-1111-4111-8111-111111111111",
    "prompt": "Build the rest of this site: explain our services, introduce the team using the supplied biographies, and add a contact page. Preserve the homepage identity and verified facts."
  },
  "idempotencyKey": "example-site-task-start-001"
}
```

[site_task_get](/api-reference#site_task_get) · MCP / client input

```json
{
  "params": {
    "id": "33333333-3333-4333-8333-333333333333"
  }
}
```

Task states include waiting_homepage, planning, building, completed, needs_attention and cancelled. Save the task id returned by site_task_start and use it as params.id in site_task_get/cancel; the 33333333-3333-4333-8333-333333333333 task example is not the homepage generation id. A final homepage with quality notes can seed the remaining site pages; its original scores and findings remain unchanged. Read message/error and each pages[].generationId. Use site_task_watch for bounded waits. A site conversation change is another site_task_start with siteId and the current owned homepageGenerationId; the application resolves affected pages and shared facts.

[site_task_start](/api-reference#site_task_start) · MCP / client input

```json
{
  "body": {
    "homepageGenerationId": "11111111-1111-4111-8111-111111111111",
    "siteId": "22222222-2222-4222-8222-222222222222",
    "prompt": "Update the shared phone number to +1 202 555 0123 and revise only the pages affected by that fact. Keep unrelated content unchanged."
  },
  "idempotencyKey": "example-site-task-start-002"
}
```

[site_task_cancel](/api-reference#site_task_cancel) · MCP / client input

```json
{
  "params": {
    "id": "33333333-3333-4333-8333-333333333333"
  },
  "body": {},
  "idempotencyKey": "example-site-task-cancel-001"
}
```

## Control the scope explicitly when needed

1. Use site_for_page or site_create, then site_get to read current scope. site_history reads immutable scope versions.
2. site_edit saves the full draft page list with expectedVersion; the homepage ID and / path stay fixed. site_facts separately records exact fact corrections.
3. site_propose requests an AI scope proposal; use site_job_get/watch. A conflicting completed proposal can be applied with site_proposal_apply against the currently reviewed version/hash.
4. site_approve binds expectedVersion and expectedHash for the exact scope. This approves the document; it is not a credit quote or a build action.
5. site_build creates an atomic selected-child batch using the checked homepage content/image hashes, approved scope hash and sharedFacts hash. Read site_build_get/watch for each child generation.
6. For exact source revisions, read site_revision_options. Pass its authoritative binding and same-page parent generation/content hashes to site_revise with local, pages or global scope. Do not manufacture missing bindings.

The automatic site-message path is usually simpler. The exact commands support explicit editorial review and automation that already knows the intended page set. Read their full schemas from the installed reference.

[Installed site commands](</api-reference#site_task_start>)

## Author and publish blog content

A blog uses versioned structured content, not executable HTML or a separate dashboard. Ask a site message to add the blog index if one does not exist. Create the draft with exact supplied text; author and date may be null and are never invented from account information.

[site_post_create](/api-reference#site_post_create) · MCP / client input

```json
{
  "params": {
    "id": "11111111-1111-4111-8111-111111111111"
  },
  "body": {
    "content": {
      "title": "Our workshop is open",
      "description": "How to request a repair appointment.",
      "slug": "workshop-open",
      "author": null,
      "date": null,
      "body": [
        {
          "type": "paragraph",
          "text": "Send your repair request and we will confirm the next available appointment."
        }
      ]
    }
  },
  "idempotencyKey": "example-site-post-create-001"
}
```

Read site_posts, site_post_get and site_post_history. Edit with site_post_edit using current.revision and current.hash. Draft edits preserve selected and live versions. Select the exact post versions for the next scope; keep every post you intend to retain in the selection.

[site_posts_select](/api-reference#site_posts_select) · MCP / client input

```json
{
  "params": {
    "id": "11111111-1111-4111-8111-111111111111"
  },
  "body": {
    "expectedVersion": 1,
    "expectedHash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "pageSize": 6,
    "posts": [
      {
        "postId": "22222222-2222-4222-8222-222222222222",
        "revision": 1,
        "hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      }
    ]
  },
  "idempotencyKey": "example-site-posts-select-001"
}
```

Selection changes managed article/pagination routes and clears scope approval. Read and approve the changed scope, then build/revise its affected pages through the exact commands or send a site message to build the selected content. Once every required version is checked, create and publish a complete site release. Saving a post alone does not change the public site.

[Release, publish and roll back](</docs/agent-publishing>)
