Expose duplicate detection to AI/MCP tools #26866
Raaghav-Pillai
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! I am a student at UIUC studying Computer Science and Statistics. I was recently talking to a company through a student organization I’m part of called Revamp, and they were considering using Twenty as their CRM.
While I was testing Twenty for the company I spent some time looking through the product and really liked how flexible the architecture is. I noticed something that I thought could be a useful addition and wanted to bring it up.
You already have duplicate detection built into the backend through CommonFindDuplicatesQueryRunnerService, and it is exposed through GraphQL, REST, and the UI. However, from what I could tell, this capability is not currently exposed through the AI/MCP database tools.
The existing crm-hygiene skill instead instructs the agent to read an object’s duplicateCriteria and manually search those fields. I was wondering if it would make sense to expose the existing duplicate detection directly to agents through tools such as:
find_duplicates_companies
find_duplicates_people
My thought for a first implementation would be to keep it completely read-only. The tool could accept one or more record IDs, reuse the existing duplicate detection logic, respect the existing object read permissions, and only be generated for objects that have duplicateCriteria.
This would let an AI agent use the same canonical duplicate detection logic as the rest of Twenty instead of reconstructing the logic itself.
I would be happy to implement this and add MCP/tool-registry integration tests if this fits the direction you want the AI tooling to go.
One thing I wasn’t sure about architecturally is whether you would prefer find_duplicates to become another database CRUD operation alongside find_many, find_one, and group_by, or whether duplicate detection should live in a separate tool/provider layer.
Would this be something you’d be open to a contribution for?
All reactions