Skip to content

Tool annotations: TFA and feedback tools carry none; invokeCapability write consent is a model-set parameter #562

Open

Description

@JacobTRND

I did a static review of the tool registrations at 76ff1891fc0c09e351efb71d051ab70abc9c44ec (v2.6.5). Two gaps mean MCP clients cannot use annotations to decide when to ask the user before a write or a cost-bearing call:

  1. Six tools carry no annotations at all:

    • src/tools/tfa-rca-collaboration.ts: tfaRcaTurn, getTfaTurnResult, triggerRcaReport, getBuildFailureThemes, listTestsInFailureTheme;
    • src/tools/feedback.ts: submitFeedback.

    Several of these act rather than read:

    • tfaRcaTurn submits an analysis turn.
    • triggerRcaReport's own description says force: true "always pays the full re-analysis cost".
    • getBuildFailureThemes "triggers server-side computation".
    • submitFeedback sends user-written text to BrowserStack.

    With no readOnlyHint or destructiveHint, a client cannot tell them from reads. The read-only ones (getTfaTurnResult, listTestsInFailureTheme) would also benefit from readOnlyHint: true.

  2. invokeCapability write consent is a model-set parameter. src/tools/capability-registry/register.ts:1132 annotates the tool readOnlyHint: false, destructiveHint: false. One tool serves every catalogue read and every catalogue write:

    • the bundled indexes hold 617 capabilities at this commit, 246 of them non-GET (deletes are refused, as the code comment says);
    • archive, close, merge and bulk edits go through it, and its description calls them writes.

    Per-call consent is the optional user_permission: 'granted' argument, which the model fills in. A client therefore sees one non-destructive tool, and the only sign of user consent is a value the model can supply itself. Options:

    • split reads and writes into separate tools, with destructiveHint: true on the write tool for archive, close and merge;
    • confirm writes through MCP elicitation instead of a parameter;
    • at least document that clients should treat every invokeCapability call as a write and confirm it with the user.

The session-starting tools (runBrowserLiveSession, runAppLiveSession, runAppTestsOnBrowserStack, takeAppScreenshot, startAccessibilityScan) are annotated readOnlyHint: false, which is right.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions