Skip to content

Add consequentialHint to ToolAnnotations#217

Open
beaufortfrancois wants to merge 2 commits into
webmachinelearning:mainfrom
beaufortfrancois:consequentialHint
Open

Add consequentialHint to ToolAnnotations#217
beaufortfrancois wants to merge 2 commits into
webmachinelearning:mainfrom
beaufortfrancois:consequentialHint

Conversation

@beaufortfrancois

@beaufortfrancois beaufortfrancois commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Fix #176


Preview | Diff

@beaufortfrancois

Copy link
Copy Markdown
Contributor Author

@domfarolino Please review

@NoClueMike NoClueMike left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When did "hints" deserve the time spent over actual communication. In the clients world, they can't even enable api"s for tools.

@victorhuangwq victorhuangwq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beaufortfrancois thanks for adding this!

On a broader note, I'm starting to think if all ToolAnnotations should default to null instead of just false?

For example, I'm not sure if consequential not being set is the same as false.

Comment thread index.bs
@johannhof

Copy link
Copy Markdown
Contributor

Is null an option? I agree it seems better.

@domfarolino

Copy link
Copy Markdown
Collaborator

If we don't like the idea of defaulting hints to false, we could provide no default at all; in that case they'd just be missing from the ToolAnnotations dictionary (undefined, just like annotations.fakeHint) and wouldn't be provided to the model (or the model would be expecting them, and would have to "fill in" false).

But then we'd have three values to think about: undefined, true, and false. Tool authors might ask when to explicitly pass false vs. leave it undefined, and tool consumers (models) now need to think about whether there's significance in the third value—did the developer just mean to omit the hint, but passed in false explicitly? Or does explicit false mean something special that undefined doesn't capture??

The required/default boolean sidesteps this noise, so I like it more. I think it just matters how this will be used by models, but I think the binary makes more sense and models are unlikely to make use of all three values.

@victorhuangwq

Copy link
Copy Markdown
Contributor

My original concern was that from an agent developer's perspective, it's an easy mistake to read consequentialHint = false as "this is safe," when it might just mean the web developer forgot to set it (or didn't know they should). A third "unset" state would mitigate that, though I take your point about the noise a special third value introduces.

I agree that making it required sidesteps the "forgot to set" problem entirely. If we go that route, do we intend it to be required for all ToolAnnotations, or only a certain subset? (Btw I don't think this discussion should block the current PR)

@beaufortfrancois
beaufortfrancois force-pushed the consequentialHint branch 2 times, most recently from dc9963c to 2dcdd49 Compare July 22, 2026 07:34
Comment thread index.bs

<h4 id="mitigation-consequential-annotation">Consequential Annotation for Tool Executions</h4>

**What:** Providing agents with a signal that a tool's execution results in significant, real-world, or non-reversible consequences.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are more cases covered here than on line 670 where the dictionary fields are defined. These should align. Probably with this, more detailed, one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me what you suggest.

@bvandersloot-mozilla

Copy link
Copy Markdown

A ternary on the flag seems unwise. Particularly when undefined is falsy.

Assigning the safe default would be better than making them required, and is probably better than the current unsafe default (untrustedContentHint = false and consequentialHint = false) . Particularly because the failure cases have pretty different visibility and severity, e.g. increased friction vs silently taking a consequential action.

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.

Hint for reversible or consequential actions

6 participants