[TAN-7981] Add MCP update tools for project and phase#14075
Open
amanda-anderson wants to merge 1 commit into
Open
[TAN-7981] Add MCP update tools for project and phase#14075amanda-anderson wants to merge 1 commit into
amanda-anderson wants to merge 1 commit into
Conversation
amanda-anderson
commented
Jun 12, 2026
| } | ||
| }, | ||
|
|
||
| manual_voters_amount: { type: 'integer', description: 'Count of offline/manually-recorded voters. Only for voting phases.' } |
Contributor
Author
There was a problem hiding this comment.
This was missing from the create phase tool.
amanda-anderson
commented
Jun 12, 2026
| # `*_multiloc` fields merge per-locale (locales the caller didn't pass are kept); others replace. | ||
| # Callers should reject unknown/non-updatable keys before calling this. | ||
| def apply_attributes(record, attributes) | ||
| attributes.each do |key, value| |
Contributor
Author
There was a problem hiding this comment.
Moved this to shared file, as the new update tools for Phase/Project also need it.
amanda-anderson
commented
Jun 12, 2026
| include_all_areas: { type: 'boolean', description: 'Whether the project is associated with all areas.' }, | ||
| listed: { type: 'boolean', description: 'Whether the project is listed/discoverable (vs accessible by link only).' }, | ||
| track_participation_location: { type: 'boolean', description: "Whether to track participants' location (requires the participation-location feature)." } | ||
| }, |
Contributor
Author
There was a problem hiding this comment.
Again, some missing attributes added to the create project tool. Could be argued we don't need Listed here, but I don't think it hurts either :)
amanda-anderson
commented
Jun 12, 2026
| <<~DESC.squish | ||
| Updates an existing phase. Partial update — only the fields you pass change, and `*_multiloc` | ||
| fields merge per locale. Accepts the same fields as create_phase, except project_id — a phase | ||
| can't be moved to another project. Changing participation_method is rejected if the phase |
Contributor
Author
There was a problem hiding this comment.
A phase can't be moved to another project
Figured this was best ^
amanda-anderson
commented
Jun 12, 2026
| @@ -62,6 +62,8 @@ def tools | |||
| McpServer::Tools::CreatePollQuestion, | |||
Contributor
Author
There was a problem hiding this comment.
Note: Flagging use of Clade to help write code.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changelog
Added