Русский
Academy: all guides

Site owner · MCP and the agent

MCP tools and how the agent works: from inspection to publication

How to connect an assistant to your site, where to find the current tools, how it changes a draft, and when approval and publication are required. A practical guide for site owners.

Connecting and permissions

HOBA exposes an MCP server for external clients. The client runs the model, and HOBA executes canonical tools as the connected user: it checks that user’s current permissions, the connection scope, and the approval settings.

There are two addresses. The site address /api/v1/cms/sites/<site UUID>/mcp works with one site only; do not pass site_id in its arguments. The global address /api/v1/mcp is for system operators and requires site_id on site tools. A site accepts OAuth or a site API key; the global address accepts only an operator OAuth grant.

Scopes are granted separately:

  • hoba:read reads pages, content, catalogs, and resources.

  • hoba:write changes drafts, composition, media, and reusable blocks.

  • hoba:publish stages, generates, inspects, activates, and rolls back releases.

Editing usually needs hoba:read and hoba:write. Publication is a separate grant. Every call also checks the site role, so a scope cannot restore permissions that were removed. Manage the connection in Site → Settings → External agents: it shows scopes, last use, and revocation.

Creating an empty site draft is the separate hoba:site.create_draft scope on the global address only. It does not grant rights to edit an existing site.

Where to find the current list

The authoritative list is tools/list on your MCP address with the current credentials. The server filters it by scope, transport, licence, and readiness. Protocol names use underscores: hoba_content_get_page, hoba_composer_find_nodes. Internal dotted names identify the same tool, but requests must use the advertised name and schema.

After changing scopes, licence, or readiness, request tools/list again: no change notification is sent. A listed tool does not guarantee access to a particular page or site; the call still checks its target.

Core references: /api/v1/docs, /api/v1/docs.md, and /api/v1/openapi.json. The file /api/v1/docs/agent-tools.json describes the built-in agent’s static base registry; it is not the complete MCP list. Use authenticated tools/list instead.

Useful tool groups

These are representatives of each group. See tools/list and each tool description for the complete set and exact fields.

  • Inspect: hoba_site_describe, hoba_site_health, hoba_content_list_pages, hoba_content_get_page, hoba_content_get_tree, hoba_composer_find_nodes, hoba_composer_get_node, hoba_text_get_content, hoba_blocks_list, hoba_layout_list, hoba_collection_list, hoba_media_list, hoba_release_current.

  • Draft edits: hoba_content_create_page, hoba_content_update_page, hoba_composition_create_node, hoba_composer_update_content, hoba_text_put_content, hoba_content_create_collection, hoba_content_create_collection_entry, hoba_media_upload.

  • Settings: hoba_settings_catalog, hoba_settings_get, hoba_settings_set, hoba_settings_manage. hoba_settings_set supports dry_run for supported site sections: that is a preview, not approval.

  • Visual checks: hoba_page_screenshot and hoba_composer_render_scene only when they appear in the current tools/list. A static PNG does not test clicks, scrolling, or animation.

  • Publication: hoba_release_stage, hoba_release_generate (HTTP), hoba_release_status, hoba_release_activate, hoba_release_rollback, hoba_release_schedule.

Example read request: {"method":"tools/call","params":{"name":"hoba_content_list_pages","arguments":{"q":"contacts","fields":["node_id","label","slug","locale"],"limit":5}}}. On the global address, add site_id to the arguments.

The groups differ in effect: reads do not change the site, edits change the draft only, settings use the administrative path, and publication switches a release. Approval is a separate human decision, not another tool call.

Task path: inspect → plan → edit → read back → approve → publish

Start with the task and its boundary. For example: “Find the Contact page. Propose one heading and a short paragraph. Show the plan first, change the draft only, and do not publish.” That prompt states the goal, the scope, and the publication prohibition up front.

  1. Inspect. The agent finds the site and target: hoba_content_list_pages with q and a small limit, then hoba_content_get_page; it reads metadata, composition, block schemas, and the current revision. Do not ask it to guess IDs.

  2. Plan. The agent lists what it read, which blocks and settings it will touch, and what it will leave unchanged. The plan stays in the conversation or the client response; MCP has no separate mandatory plan step. Do not start editing until scope and copy are agreed.

  3. Edit the draft. For text, read with hoba_text_get_content and include:["text","document"], then write with hoba_text_put_content and the revision. For blocks, use hoba_composer_update_content or hoba_composition_create_node. Pass expected_revision from the latest read; after REVISION_CONFLICT reread and recompute. This changes the draft, not the public site.

  4. Read back and preview. hoba_content_get_page with include:["composition"], then hoba_composer_get_node; open preview_url from the response if present (it requires sign-in). Use hoba_page_screenshot and hoba_composer_render_scene only when available. Check copy, links, and mobile layout.

  5. Approve only where needed. Site policy defaults to propose: a pending_confirmation response means the draft has not changed. Give the reviewer proposal_id and approval.path; a human decides in Admin. direct and mixed may apply eligible edits automatically. The agent does not change its own policy or approve its own work.

  6. Publish only on an explicit request. With hoba:publish: hoba_release_stage snapshots the draft, hoba_release_generate starts the build, hoba_release_status reports readiness, and hoba_release_activate switches the public version. applied or accepted does not mean the site is live; wait for readiness and check the public address.

Example explicit publication: “Publish only this prepared draft and show the status. If a permission is missing or the build is not ready, stop and explain.” Without such a request, the work stays in the draft.

Safe content examples

These examples target a draft. Use real IDs and revisions from the read; the examples do not publish anything.

Heading. Create a block in an existing page composition: {"graph_id":"<graph from hoba_content_get_page>","parent_id":"<root node>","node_type":"core.header","position":0,"expected_revision":12,"data":{"title":"Autumn collection","level":"h1"}}. Do not insert HTML: the block data stays editable.

Page with a shared layout. Do not rebuild the header and footer; reuse the layout: {"parent_id":"<root tree node>","slug":"autumn","label":"Autumn collection","position":3,"expected_revision":8,"layout_from_page_id":"<existing page UUID>"}. Check the assigned layout after creation.

Collection. For example, a simple seasonal index: {"slug":"seasons","name":"Seasons","fields":[{"key":"title","kind":"text","required":true},{"key":"summary","kind":"textarea"}]}. Then add entries with hoba_content_create_collection_entry and check the schema in Admin.

What the agent does automatically, and when it asks

The agent can automatically find and read objects within its granted permissions, check revisions and schemas, prepare a plan, make eligible edits, read the result back, replay a request with the same idempotency key, and report what was applied. It does not guess passwords, bypass a refusal, or widen its own access.

It stops and asks the owner or operator when the scope or role is missing; the site policy requires review; publication, rollback, or deletion is next; copy, an image, or a structural decision is missing; site settings must change; or the request has more than one reasonable interpretation. A chat question is not approval for an edit.

A sensible owner setup: start with hoba:read on a test site, then add hoba:write with propose; grant hoba:publish only to whoever actually publishes. Do not ask the agent to change its policy or approve its own proposal.

Limits and what we do not promise

MCP does not run arbitrary JavaScript, HTML, SQL, or shell commands. It cannot build or import a .hoba, download site sources, export data, or restore an installation. Those are separate Admin, SDK, and operations workflows.

Draft read tools search labels and slugs, not the full text of published pages. applied means the operation committed to canonical history, not that visitors can already see it. accepted and queued usually mean a job: follow its status.

A tool missing from tools/list is not necessarily disabled globally: scope, transport, licence, or readiness may be the reason. A listed tool can still reject the chosen target. A static preview or PNG does not prove interactive behaviour.

How to verify the result

In the client, request tools/list, perform the read, and check the response: outcome, operation_id, revision, proposal_status, approval.path, and job status. After an edit, read the saved object again and compare its content and revision.

In Admin, open Overview → Approvals for proposals, Site → Settings → External agents for scopes and last connection use, and Releases for staging, generation, and activation. Check the public page without an Admin session.

If a tool disappears or rejects a call, refresh tools/list and check scope, licence, role, and readiness. Do not look for a bypass through another address, key, or Admin screen; retry only after fixing the cause.