-
Notifications
You must be signed in to change notification settings - Fork 4.5k
MCP: name-based resolution for Projects fields #2760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
veralizeth
wants to merge
8
commits into
main
Choose a base branch
from
veralizeth/name-based-project-fields
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,106
−40
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7c3f8c7
Let agents address Project fields, single-select options, and item fi…
veralizeth 58dc124
Adding a method to resolve params resolveItemIDFromIssueArgs
veralizeth 33b08af
Adding the DatabaseID to be able to match the graphQL
veralizeth 1e0b81e
Changing the parsing to strconv.ParseInt
veralizeth cb2a9ef
Changing description.
veralizeth 909713f
update readme
veralizeth 52b61c4
Merge branch 'main' into veralizeth/name-based-project-fields
veralizeth 9bdfeeb
Fixing copilot comments
veralizeth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fieldsandfield_namesboth resolve to field IDs, and the "use one or the other" rule only lives in the description text. This same pair shows up four times in the PR — theget_project_itemandlist_project_itemsschema blocks in projects.go, plus both .snap fixtures — so whatever we decide needs to apply the same way in all of them (README too).Right now nothing stops a caller from sending both, and if they do, the handler quietly appends the resolved names onto
fields(fields = append(fields, resolvedIDs...)) — which none of the four descriptions mention.Two ways to go:
Put the constraint in the schema. It sits next to
properties, at theinputSchemalevel (not inside a property), roughly:Two catches, and they hit every copy: neither field is required, so you need that first "neither" branch just to keep the common case legal; and these props are shared across
methods on each tool (get_project_field/get_project_item, and the list methods), so a top-leveloneOfwould wrongly constrain the others. Doing it right means gating per method (if method == get_project_item ...) in all four spots — a lot of schema for what it buys.Leave it in prose but enforce it once in the handler — reject when both are set with a structured error, exactly like
updated_fieldalready does for{id}+{name}. One check covers both read methods, and we just make the descriptions symmetric (field_namescurrently says nothing about the both-set case).I'd go with 2 — the write path already draws this line in code, so matching it on the read path keeps things consistent, avoids repeating awkward schema in four places, and the fix lives in one spot instead of four. Open to 1 if we think the schema-level guarantee is worth the per-method branching.