Skip to content

fix: add OpenWorldHint to default-on UGC issue/PR/discussion tools - #3260

Open
tiagovilasboas wants to merge 1 commit into
github:mainfrom
tiagovilasboas:cursor/openworldhint-ugc-tools-41e7
Open

tiagovilasboas wants to merge 1 commit into
github:mainfrom
tiagovilasboas:cursor/openworldhint-ugc-tools-41e7

Conversation

@tiagovilasboas

@tiagovilasboas tiagovilasboas commented Sep 10, 2026

Copy link
Copy Markdown

Summary

Add an explicit OpenWorldHint: true to the always-on issue, pull request, and discussion tools that return or publish user-generated content, matching the annotation already shipped on granular issue/PR tools.

Why

MCP clients that require a real boolean (the same class of gap as ReadOnlyHint in #2483) cannot treat an omitted OpenWorldHint as the spec default of true. That leaves the default-on UGC path unannotated while feature-flagged granular siblings already declare OpenWorldHint: true.

#1100 postponed a broad OSS rollout because adding the hint to search tools on the remote server was disruptive. This PR is a narrow slice: default-on issue/PR/discussion UGC only. Search tools and closed-world getters are unchanged.

Related: #1100 (postponed broad OSS OpenWorldHint), granular tools on main, stalled broad #1700.

What changed

  • issue_read, issue_write, add_issue_comment
  • pull_request_read, pull_request_review_write, add_comment_to_pending_review, add_reply_to_pull_request_comment
  • get_discussion, get_discussion_comments, discussion_comment_write
  • Matching test assertions and __toolsnaps__ updates

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Annotations only. Clients that honor explicit openWorldHint: true can now prompt before fetching or publishing untrusted issue/PR/discussion content. Spec-compliant clients that already default omitted to true see no semantic change.

Prompts tested (tool changes only)

  • Annotation-only change; no tool arguments or handler behavior changed
  • Covered by existing tool definition tests plus OpenWorldHint assertions

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

AppSec: issue/PR/discussion bodies and comments are untrusted UGC. An explicit open-world hint lets permission gates treat that surface as external data instead of a closed, trusted domain.

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Focused pkg/github annotation/toolsnap tests and TestAllToolRegistrationsExplicitlySetReadOnlyHint passed. Full ./script/test / lint status will be reflected in CI.

Docs

  • Not needed
  • Updated (README / docs / examples)

@tiagovilasboas

Copy link
Copy Markdown
Author

Hi — first-time contributor here. Could a maintainer please approve and run the pending workflows when you have a moment? Thanks!

@SamMorrowDrums SamMorrowDrums added go Pull requests that update go code policies & governance Feedback and questions on enterprise policies and governance labels Sep 12, 2026
@cursor
cursor Bot force-pushed the cursor/openworldhint-ugc-tools-41e7 branch from 4ac0c89 to 18c5d4d Compare September 15, 2026 19:30
@tiagovilasboas
tiagovilasboas marked this pull request as ready for review September 20, 2026 09:56
@tiagovilasboas
tiagovilasboas requested a review from a team as a code owner September 20, 2026 09:56
…n tools

Clients that require an explicit boolean (same class of gap as ReadOnlyHint)
cannot treat omitted OpenWorldHint as the spec default of true. Granular
issue/PR tools already declare OpenWorldHint: true; the always-on
counterparts that return or publish issue, PR, review, and discussion
user-generated content did not.

Scope is limited to that default-on UGC surface and does not change search
tools, matching the github#1100 decision to postpone a broad OSS rollout.

Co-authored-by: Tiago Vilas Boas <tcarvalhovb@gmail.com>
@tiagovilasboas
tiagovilasboas force-pushed the cursor/openworldhint-ugc-tools-41e7 branch from 18c5d4d to 5a3cbde Compare September 20, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update go code policies & governance Feedback and questions on enterprise policies and governance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants