Skip to content

allow user to undo the actions done by ai agent#241

Open
felixfa-1 wants to merge 1 commit intomasterfrom
feat/undo-ai-agent-column-changes
Open

allow user to undo the actions done by ai agent#241
felixfa-1 wants to merge 1 commit intomasterfrom
feat/undo-ai-agent-column-changes

Conversation

@felixfa-1
Copy link
Copy Markdown
Collaborator

we want to allow users to undo action done by ai-agents

Copy link
Copy Markdown
Collaborator

@AvnerMaster AvnerMaster left a comment

Choose a reason for hiding this comment

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

Code Review

Clean, focused PR. Two comments below — one actionable, one informational.

"\n mutation createItem($boardId: ID!, $itemName: String!, $groupId: String, $columnValues: JSON) {\n create_item(board_id: $boardId, item_name: $itemName, group_id: $groupId, column_values: $columnValues) {\n id\n name\n }\n }\n": typeof types.CreateItemDocument,
"\n query getBoardSchema($boardId: ID!) {\n boards(ids: [$boardId]) {\n groups {\n id\n title\n }\n columns {\n id\n type\n title\n }\n }\n }\n": typeof types.GetBoardSchemaDocument,
"\n mutation changeItemColumnValues($boardId: ID!, $itemId: ID!, $columnValues: JSON!) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues) {\n id\n }\n }\n": typeof types.ChangeItemColumnValuesDocument,
"\n mutation changeItemColumnValues($boardId: ID!, $itemId: ID!, $columnValues: JSON!, $options: JSON) {\n change_multiple_column_values(board_id: $boardId, item_id: $itemId, column_values: $columnValues, options: $options) {\n id\n }\n }\n": typeof types.ChangeItemColumnValuesDocument,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Worth confirming that npm run codegen (or npm run fetch:generate) was run to regenerate these files, rather than hand-editing them. The mcp-tool guide marks this as CRITICAL after any .graphql.ts change.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This comment is here just to make sure you did the edit through the command and not manually

boardId: boardId.toString(),
itemId: input.itemId.toString(),
columnValues: input.columnValues,
options: { disable_undo: false },
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The options addition looks good. One thing — per the mcp-tool guide:

When modifying an existing tool's behavior, review and update getDescription() to reflect the new capabilities.

getDescription() above still returns 'Change the column values of an item in a monday.com board' with no mention that changes are now undoable. Consider updating it, e.g.:

return 'Change the column values of an item in a monday.com board. Changes made through this tool can be undone by the user.';

This way agents could inform users that the action is reversible.

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.

2 participants