Skip to content

Ask a database's terms of use in a form the client shows - #877

Merged
ccomb merged 4 commits into
mainfrom
mcp-licence-elicitation
Nov 26, 2026
Merged

ccomb merged 4 commits into
mainfrom
mcp-licence-elicitation

Conversation

@ccomb

@ccomb ccomb commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

A database whose publisher asks its terms accepted was opened by the assistant: the refused tool told it to show the terms and call accept_terms once the person agreed, and nothing but that instruction stopped it from calling accept_terms on its own.

A client of the 2026-07-28 revision that says it shows forms (elicitation in its capabilities, an empty object meaning forms) is now asked through the client instead:

  • a tool that would read such a database answers resultType: "input_required" with one form per text, keyed terms-<fingerprint>: the text in full, the counting clause if any, and no field: the client's accept button is the agreement (a box to tick as well turned a click on accept with the box left empty into a refusal). When the terms are a dependency's, the form says which database the person asked for reads it;
  • the client sends the same call again with inputResponses; every form accepted, the terms are recorded and the tool runs. A no refuses the call, telling the assistant not to accept on the person's behalf. A form closed with no answer, which is what a client with no screen sends, also refuses it, naming the volca_terms cookie that accepts the terms instead;
  • the key carries the text's fingerprint, so an answer holds for the very text shown, with no requestState to trust;
  • accept_terms goes through the same form for such a client;
  • a licence refusal or an unknown tool is answered before any form, so nobody accepts terms only to be refused;
  • a question to the person is not counted as a computation in the usage log.

Older clients, and modern clients that show no form, get today's refusal text unchanged.

Tested with ./build.sh --test --werror, fourmolu and hlint; MCPTermsFormSpec covers both eras, each answer, an answer for another text, a dependency's terms, the licence order, accept_terms, and the pure steps. Against a local engine, an assistant client of the 2026-07-28 revision run with no screen received the form, answered cancel, got the refusal naming the cookie and did not call accept_terms; with the cookie set in its configuration, the search answered. The form shown to a person in an interactive client was not tried.

A client of the 2026-07-28 revision that says it shows forms is now
answered input_required when a tool would read a database whose terms the
person has not accepted: one form per text, the text in full and one box to
tick. The client sends the same call again with the person's answer, and the
tool runs once every box is ticked. accept_terms goes through the same form
for such a client, so the assistant can no longer accept for the person. A
form closed with no answer, which is also what a client with no screen
sends, is refused with the cookie that accepts the terms instead. Older
clients, and clients that show no form, are asked in the conversation as
before.
The outcome of the terms step now tells "nothing missing" from "accepted
these terms", so a call records nothing unless the person ticked a box. A
refusal names only the terms the person refused. The cookie advice after a
closed form keeps the fingerprints the cookie already holds and says they
are separated by dots, so setting it does not close another database. The
order of refusals is a property of how the person is asked, with no
wildcard over it.
@ccomb ccomb added the agent-reviewed pr-cycle ran label Nov 25, 2026
The form had a box to tick as well. A person who clicked accept without
ticking it was refused, as if they had declined. The form now carries the
terms and no field, so clicking accept is the agreement.
@ccomb
ccomb merged commit f41eb21 into main Nov 26, 2026
12 checks passed
@ccomb
ccomb deleted the mcp-licence-elicitation branch November 26, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-reviewed pr-cycle ran

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant