Proposing complete, published pages
Agents can now propose a new page with its description, tags, project and section, published on approval. What changed, and the security questions that come with it.
Until now, an agent proposing a new page through the MCP could only give a path, a title and a body. The page always arrived as a bare draft, so every new page needed a second proposal to fill in its description, tags, project and section, and a third to publish it. A second proposal can't go in the same batch, because a change can't refer to a page that doesn't exist yet.
Now a new page arrives complete in one proposal.
What changed
createtakes the full metadata. Bothcreate_pageand thecreatechange inpropose_changesacceptdescription,intro,tags,project,sectionandpublish.publishdecides the status on approval. Withpublish: truethe page is published the moment the proposal is approved. Without it, it's a draft as before.- Agents are told to prefer publishing. The tool's description asks for description, tags, project and section wherever they're known, and
publish: trueunless the owner wants a draft. - A page can be put in a notes section when it's created.
createContentinsrc/db/ops.tsnow takes asectionslug and resolves it the same way an update does, including creating a project's default sections on first use. A section without a project is refused. - The review shows the project by name. A new page's project used to show as an id.
Tests in tests/sections.test.ts cover creating a page in a section, refusing a section without a project, and a published page with a section going through a proposal.
Security considerations
The short version: approval was already the only real gate, and it still is. What this change removes is a second, informal gate (the draft), and it makes the normal path one where approving a proposal puts something on the public site immediately. That raises the stakes of each review, not the reach of the agent token.
What hasn't changed
- Agents still can't write. The agent token can read and propose. Approving needs the admin token or the owner's session, and tests check that an agent can't approve its own proposal, a single op, or write content directly.
- The agent token could already ask for a published page. The proposals API validates each op against the full
CreateContentInput, which has always acceptedstatus: "published". The MCP server only limited what a well-behaved agent sends. So the MCP's options are a convenience, not a security boundary: anything the token can send toPOST /api/proposalsis what matters. - Raw HTML is dropped. The site renders markdown with raw HTML skipped, and react-markdown's default URL filter strips
javascript:links, so a proposed body can't run script on the site.
What is new or sharper
- The draft was a free preview. A draft renders only on the local site, so you could read the page in place before it went public. With
publish: true, the first time a page is rendered for real is when it's already live. Reading a markdown body in the review isn't the same as seeing the page. - A new page is approved whole. An update is split into one op per field, so you can approve the title and reject the description. A
createContentop isn't split: approving it accepts the body, every field and the published status together. There's no way to say "create this, but as a draft" except rejecting it. - Prompt injection has a shorter path to the public site. An agent that reads a web page, an issue or a file can be steered by text in it. Before, an injected page would land as a draft and need another step. Now one careless approval publishes it. Things to look for: links whose text says one thing and whose URL says another, external images (they load on every visit and can be swapped for something else after you approve), and wording that impersonates you.
- Fields the MCP hides can still be proposed. Through the API directly, a proposal can set
publishedAt(backdate a post so it sits deep in the feed),authorsandauthorship(put words in someone's name),sortOrder, or aparentIdanywhere in the tree. The review shows every field of a create, so these are visible, but they're easy to skim past. - The proposal's author is self-reported.
authoris a string the caller sends, so a review can't rely on it to know which agent or machine made a proposal. The token is the real identity, and today there's one agent token. - Publishing is hard to take back fully. The feed, search engines and anyone who saw it may keep a copy after you unpublish.
- Batches hide things. A single proposal can hold up to 100 changes. A published page tucked into a long batch of tag fixes is easy to approve with "Approve all".
Ways to tighten it, if wanted
None of these are built. In rough order of value for effort:
- Make publishing loud in the review. Show a clear "publishes on approval" badge on a create with
status: "published", and a count of them beside "Approve all". - Let a create be approved as a draft. An "Approve as draft" button that applies the op with the status changed, so a page can be accepted and previewed before it goes live.
- Preview the body with the site's renderer in the review, so what you approve is what readers will see.
- Narrow what the agent token may set. Refuse
publishedAt,authors,authorshipand similar fields on agent proposals inparseOps, leaving them to the owner. - Flag external links and images in a proposed body, listing each host.
- One token per agent, with the author taken from the token instead of the request, if more than one agent ever proposes.
Related
- What the MCP create_page call actually sends
What a goatboat MCP create_page call actually sends, hop by hop from the agent's arguments to the proposal request.
- MCP read report: pages without a description
An agent's report from one filtered list_pages call: which /docs pages lack a description, and what that proves.
- Page identity: an ID on the first line
Why code pages carry a goatboat ID on their first line, and the alternatives weighed for following pages across folder moves.
- Ideas, problems and thoughts
How ideas, problems and thoughts are filed as ordinary pages under three parent pages, optionally labelled with a project, and shown on each project's homepage.