Skip to content

feat(assistants): the personal assistants read through data-fair's MCP - #109

Merged
albanm merged 15 commits into
mainfrom
assistant-mcp-read
Dec 1, 2026
Merged

albanm merged 15 commits into
mainfrom
assistant-mcp-read

Conversation

@albanm

@albanm albanm commented Dec 1, 2026

Copy link
Copy Markdown
Member

The personal assistants (back office and portal) now read the platform through data-fair's MCP, as the person, and change things only through the page's own tools.

  • Read-only MCP offer. The back-office assistant gets data-fair's MCP server, the portal assistant its datasets server (on a portal only; the site kind is read from simple-directory with a 3 s timeout, cached a minute). Only tools annotated readOnlyHint and not destructive are offered, anonymous or not, and no form_ editor tool.
  • No autonomous writes. The assistants' approval cards are gone: a change is made on the page, by opening its edit screen (e.g. a dataset's editPage) whose WebMCP tools then appear, and the person saves it.
  • No duplication. Page tools and skills that an MCP read supersedes are dropped by name (superseded-page-tools.ts). They are kept when the turn has no built-in server (portal assistant off a portal, server unreachable), so the assistant keeps its page reads there.
  • Instructions follow the tools. A server's guide is cut to the reads the assistant got (guideForTools). The prompt notes on approvals and code mode's notes on pausing scripts, direct-only tools and files follow what the turn offers, not the agent's kind. Short notes point the assistant to the page's own tools and edit screens.
  • Docs (mcp-tools.md, autonomous-agents.md, code-mode.md, configuration.md) and the dev MCP fixture follow. New API specs check that every tool an assistant gets is a reviewed read, and that its turn text carries no autonomous-agent instructions.

Why: assistants read through read-only MCP tools and act through the page (WebMCP), with no autonomous write and no tool offered twice.

Heads-up:

  • Needs data-fair's MCP with the read tools and editPage (data-fair and mcp pull requests of the same work), deployed before or with this one.
  • Configured agents are unchanged except where their turn offers no approvals: their prompt then no longer mentions cards.

🤖 Generated with Claude Code

albanm and others added 13 commits November 27, 2026 15:07
…stants

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…P as the person

The back-office assistant gathers data-fair's platform server, the portal
assistant the datasets server beside it (/datasets/mcp), with the person's
own session (none for an anonymous visitor), read-only tools only. An
unreachable built-in server is skipped and logged for the operators.

openAutonomousAgentTools takes the built-in server itself (builtIn) rather
than the platform address; data-fair-datasets is refused as a catalog id;
the dev stand-in serves the datasets path and one platform write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The personal assistants read the platform through data-fair's MCP, so the
page tools and skills serving the same reads (dataset queries, geocoding,
application and catalog descriptions, catalog items) are dropped from what
a page declares, at hello and at tools-changed. Each read has one
implementation; page interactions and unsaved-state reads stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Against the deployment's mcp, the back-office assistant's tools from
data-fair's server are GET/HEAD operations of the platform document or
one of the reviewed read-only overrides; a new override fails until a
person reviews it. Skipped without the deployment's mcp or demo accounts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The system prompt's notes on approvals and code_mode's description of
pausing scripts, direct-only tools and files now follow what the turn
offers (turnOffersApprovals, ScriptToolOffer, directOnlyNames), not the
agent's kind: an assistant's turn, which offers none of them, no longer
reads about cards, planning, access requests or files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The personal assistants read through data-fair's built-in server of
their office, as the person, read-only tools only and no approval card;
superseded page tools are dropped; an unreachable built-in server leaves
a turn without platform reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rtals only

On the main site (the back office, a page served there) the datasets server
has no catalog to read: its calls can only fail, and its tools competed with
the page's own. Whether the socket's site is a portal is what simple-directory
says of it (/api/sites/_public: a known site that is not the main one).

A turn reading no built-in server (off a portal, or the server unreachable)
keeps the page's reads that the MCP ones otherwise supersede.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… screens

What the page shows is read and changed with the page's tools, the other
data tools read the rest of the platform; a change opens its screen (the
edit page a tool result gives), whose tools then appear, rather than ending
on "I can only read".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A personal assistant is offered a server's reads only, yet read the whole
of its instructions and skills, guides of writes included, and concluded a
change was impossible. Its servers' guides are now cut to its tools: a skill
none of whose tools it has is hidden, and so is an instructions section that
names some of the server's tools and none it was given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ds when unknown

An answer from simple-directory that fails or takes over 3 s now reads the
site as not a portal: the turn has no datasets server and keeps the page's
own reads, rather than offering a server that may have no catalog there.
Failures are still not cached. The reader is built from what it is given,
so its failure branch is unit tested.

The page guidance no longer assumes the assistant has other data tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	api/doc/autonomous-agents/autonomous-agent-write-req/.type/validate.js
#	docs/architecture/mcp-tools.md
#	tests/features/autonomous-agents/runtime.unit.spec.ts
@albanm albanm added the staging Merged into the staging branch, deployed on the staging environment label Dec 1, 2026
github-actions Bot added a commit that referenced this pull request Dec 1, 2026
@albanm
albanm marked this pull request as ready for review December 1, 2026 13:00
albanm and others added 2 commits December 1, 2026 14:03
…d, a write is not run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot added a commit that referenced this pull request Dec 1, 2026
@albanm
albanm merged commit 3726c12 into main Dec 1, 2026
9 checks passed
@albanm albanm removed the staging Merged into the staging branch, deployed on the staging environment label Dec 1, 2026
@albanm
albanm deleted the assistant-mcp-read branch December 1, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant