Repository navigation
Ask a database's terms of use in a form the client shows - #877
Merged
Merged
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_termsonce the person agreed, and nothing but that instruction stopped it from callingaccept_termson its own.A client of the 2026-07-28 revision that says it shows forms (
elicitationin its capabilities, an empty object meaning forms) is now asked through the client instead:resultType: "input_required"with one form per text, keyedterms-<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;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 thevolca_termscookie that accepts the terms instead;requestStateto trust;accept_termsgoes through the same form for such a client;Older clients, and modern clients that show no form, get today's refusal text unchanged.
Tested with
./build.sh --test --werror, fourmolu and hlint;MCPTermsFormSpeccovers 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, answeredcancel, got the refusal naming the cookie and did not callaccept_terms; with the cookie set in its configuration, the search answered. The form shown to a person in an interactive client was not tried.