Repository navigation
Give every MCP tool explicit safety hints and fix the event stats date range - #1490
Merged
Merged
Conversation
…e range Every tool now reports readOnlyHint, destructiveHint and openWorldHint as booleans. openWorldHint is false by default and true only for the tools that reach outside the account: the ones that email people, fetch an image URL or publish an event. Event stats loaded the event without its occurrences, so the whole-event range collapsed to today. Load event_occurrences before resolving it.
Contributor
✅ E2E smoke tests: Everything passed.
|
loadRelation takes a Relationship, not a relation name, so the string broke every event stats request with a 500.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
Two fixes to the MCP server, needed before the ChatGPT app review.
Explicit tool safety hints. Tools only sent the hints they declared (
IsReadOnlyorIsDestructive), soreadOnlyHint,destructiveHintandopenWorldHintweren't all present.ApiToolnow sends all three as booleans, and each tool's own attributes override the defaults.openWorldHintisfalseby default, because most tools only read or change data inside the user's account.true(#[IsOpenWorld]) only for the seven tools that reach outside the account:add_attendee,resend_ticket,resend_order_confirmationset_event_cover_image,add_lineup_performer,update_ticket_designpublish_eventEvent stats date range.
get_event_statsreported a today-only period instead of the whole event.resolveStatsDateRangeloaded the event withoutevent_occurrences, so its date getters returned null. It now loads the relation first.Tests
HiEventsServerTest: every registered tool returns all three hints as booleans and is never both read-only and destructive, and a new test pins the exact list of open-world tools.EventStatsFetchServiceTest: a regression test checks the whole-event range reaches the last occurrence's end..claude/rules/backend/mcp.mdnow records the open-world rule.