allow user to undo the actions done by ai agent#241
Conversation
AvnerMaster
left a comment
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 }, |
There was a problem hiding this comment.
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.
we want to allow users to undo action done by ai-agents