Skip to content

[TAN-7981] Add MCP update tools for project and phase#14075

Merged
amanda-anderson merged 3 commits into
masterfrom
TAN-7981-update-tools-project-phase
Jun 30, 2026
Merged

[TAN-7981] Add MCP update tools for project and phase#14075
amanda-anderson merged 3 commits into
masterfrom
TAN-7981-update-tools-project-phase

Conversation

@amanda-anderson

Copy link
Copy Markdown
Contributor

Changelog

Added

  • [TAN-7981] Add MCP update tools for Project and Phase (behind feature flag).

@notion-workspace

Copy link
Copy Markdown

}
},

manual_voters_amount: { type: 'integer', description: 'Count of offline/manually-recorded voters. Only for voting phases.' }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was missing from the create phase tool.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't include it on purpose in the first iteration, but I suppose it won't hurt to add it.

# `*_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|

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this to shared file, as the new update tools for Phase/Project also need it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't feel like the right place for this method, and the rework in #14166 actually removed it from the generic update tool altogether. Maybe what we really need is just a utility function to merge multilocs.

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)." }
},

@amanda-anderson amanda-anderson Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :)

<<~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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A phase can't be moved to another project

Figured this was best ^

@amanda-anderson amanda-anderson requested a review from adessy June 12, 2026 11:22
Base automatically changed from TAN-7898-generic-update-tool-mcp to TAN-7956-manage-mcp-authorizations-ui June 24, 2026 07:21
@amanda-anderson amanda-anderson changed the base branch from TAN-7956-manage-mcp-authorizations-ui to master June 24, 2026 10:19
@adessy

adessy commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@amanda-anderson okay to rebase this onto #14164?

@adessy adessy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved! 💯

# `*_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|

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't feel like the right place for this method, and the rework in #14166 actually removed it from the generic update tool altogether. Maybe what we really need is just a utility function to merge multilocs.

}
},

manual_voters_amount: { type: 'integer', description: 'Count of offline/manually-recorded voters. Only for voting phases.' }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't include it on purpose in the first iteration, but I suppose it won't hurt to add it.

Comment thread back/engines/commercial/mcp_server/app/lib/mcp_server/tools/update_phase.rb Outdated
Comment thread back/engines/commercial/mcp_server/app/lib/mcp_server/tools/update_project.rb Outdated
Comment thread back/engines/commercial/mcp_server/app/lib/mcp_server/tools/update_project.rb Outdated
@cl-dev-bot

cl-dev-bot commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator
Messages
📖 Changelog provided 🎉
📖 Notion issue: TAN-7981
📖

Run the e2e tests

📖 Check translation progress

Generated by 🚫 dangerJS against b0e0067

@amanda-anderson

Copy link
Copy Markdown
Contributor Author

@amanda-anderson okay to rebase this onto #14164?

@adessy Since #14164 was merged to master, I just merged master in and resolved the conflicts - hoping that's acceptable? :)

@amanda-anderson amanda-anderson merged commit b88ee73 into master Jun 30, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants