KasarKasar Docs
MCP Server

Tools — Data

Aggregations, global search, bulk operations, import/export, duplicate detection, pipeline management, and lists.

Eight tools for querying, transforming, and managing CRM data at scale.

crm_aggregate

SQL-native aggregation: count, sum, average, min, max, with optional grouping.

Parameters

ParameterTypeRequiredDescription
object_namestringyesTarget object (e.g., contacts, opportunities)
fieldstringyesField to aggregate
functionenumyesCOUNT, SUM, AVG, MIN, MAX, or COUNT_DISTINCT
group_bystringnoField to group results by
filter_fieldstringnoField to filter on before aggregating
filter_operatorstringnoFilter operator: equals, not_equals, contains, greater_than, less_than, greater_equal, less_equal, is_null, is_not_null
filter_valuestringnoValue to filter against

Behavior

  • Validates that the field exists on the target object.
  • Rejects SUM and AVG on non-numeric field types (TEXT, SELECT, etc.).
  • When group_by is provided, returns one row per distinct group value.

Example

"How many contacts do I have per status?"

{
  "object_name": "contacts",
  "field": "id",
  "function": "COUNT",
  "group_by": "status"
}

Search across ALL objects in one call.

Parameters

ParameterTypeRequiredDescription
querystringyesSearch term (minimum 2 characters)
limitnumbernoMax results per object. Default 20, max 50.
offsetnumbernoPagination offset
object_namestringnoRestrict search to a single object

Behavior

  • Searches all fields of type TEXT, EMAIL, URL, PHONE, and TEXTAREA.
  • Results are grouped by object type.
  • When object_name is provided, only that object is searched.

Example

"Find everything related to Acme"

{
  "query": "acme"
}

Returns matches across contacts, companies, opportunities, and any custom objects.


crm_bulk_update

Batch operations on multiple records.

Parameters

ParameterTypeRequiredDescription
actionenumyesupdate_field, add_relation, or remove_relation
object_namestringyesTarget object
record_idsstring[]yesIDs of records to update
field_namestringcond.Field to update (required for update_field)
field_valuestringcond.New value (required for update_field)
relation_fieldstringcond.Relation field name (required for add_relation / remove_relation)
target_idsstring[]cond.Related record IDs (required for add_relation / remove_relation)

Behavior

  • RBAC is enforced per record -- if the user lacks write access to a specific record, that record fails without blocking the rest.
  • Partial failure is supported: the response reports which records succeeded and which failed.

Example

"Set the description to 'VIP client' on these 3 contacts"

{
  "action": "update_field",
  "object_name": "contacts",
  "record_ids": ["id-1", "id-2", "id-3"],
  "field_name": "description",
  "field_value": "VIP client"
}

crm_import

Import data from JSON or CSV.

Parameters

ParameterTypeRequiredDescription
object_namestringyesTarget object
formatenumyesjson or csv
datastringyesThe data payload as a string

Behavior

  • CSV is parsed with PapaParse. Column headers are required and must match field names.
  • Pipeline defaults are auto-applied when the target object has a PIPELINE field.
  • Duplicate records are counted separately in the response.
  • Under 100 records: imported immediately and the result is returned inline.
  • 100 records or more: the import is queued as a background job and a job ID is returned.

Example

"Import these 5 contacts"

{
  "object_name": "contacts",
  "format": "json",
  "data": "[{\"first_name\":\"Alice\",\"last_name\":\"Martin\",\"email\":\"alice@example.com\"},{\"first_name\":\"Bob\",\"last_name\":\"Dupont\",\"email\":\"bob@example.com\"},{\"first_name\":\"Clara\",\"last_name\":\"Duval\",\"email\":\"clara@example.com\"},{\"first_name\":\"David\",\"last_name\":\"Leroy\",\"email\":\"david@example.com\"},{\"first_name\":\"Eva\",\"last_name\":\"Moreau\",\"email\":\"eva@example.com\"}]"
}

crm_export

Export records as JSON or CSV.

Parameters

ParameterTypeRequiredDescription
object_namestringyesSource object
formatenumyesjson or csv
fieldsstring[]noSpecific fields to include (defaults to all)
filter_fieldstringnoField to filter on
filter_operatorstringnoFilter operator: equals, not_equals, contains, in, greater_than, less_than, greater_equal, less_equal, is_null, is_not_null
filter_valuestringnoFilter value
limitnumbernoMax records to export. Default 500, max 2000.

Behavior

  • When fields is omitted, all fields on the object are exported.
  • The hard limit is 2000 records per export call.

Example

"Export all contacts as CSV"

{
  "object_name": "contacts",
  "format": "csv"
}

crm_find_duplicates

Detect and merge duplicate records.

Parameters

ParameterTypeRequiredDescription
actionenumyesdetect or merge
object_namestringyesTarget object
min_scorenumbernoMinimum similarity score (0-100, default 70, detect only)
fieldsstring[]noFields to compare (detect only)
limitnumbernoMax duplicate groups to return (detect only)
master_idstringcond.Record to keep (merge only)
duplicate_idsstring[]cond.Records to merge into master (merge only)
merge_strategyenumnokeep_master or fill_blanks (merge only, defaults to fill_blanks)

Behavior

  • Detect compares records by email, phone, LinkedIn URL, and name (case-insensitive). Returns groups of potential duplicates ranked by similarity score.
  • Merge re-links all BELONGS_TO_ONE and MANY_TO_MANY relations from duplicate records to the master before deleting the duplicates. With fill_blanks, empty fields on the master are filled from duplicates before deletion.

Example

"Find duplicate contacts"

{
  "action": "detect",
  "object_name": "contacts"
}

"Merge these duplicates into the master"

{
  "action": "merge",
  "object_name": "contacts",
  "master_id": "uuid-master",
  "duplicate_ids": ["uuid-dup-1", "uuid-dup-2"],
  "merge_strategy": "fill_blanks"
}

crm_move_deal

Move a record through pipeline stages.

Parameters

ParameterTypeRequiredDescription
object_namestringyesObject with a PIPELINE field
record_idstringyesRecord to move
step_idstringyesTarget pipeline step ID

Behavior

  • Works on any object that has a PIPELINE field, not just opportunities.
  • Validates that the target step belongs to the correct pipeline for the record.
  • The pipeline ID is auto-inferred from the record -- you only need to provide the step.

Example

"Move this opportunity to the Negotiation stage"

{
  "object_name": "opportunities",
  "record_id": "uuid-opp",
  "step_id": "uuid-negotiation-step"
}

crm_manage_lists

Manage multi-object lists (custom collections).

Parameters

ParameterTypeRequiredDescription
actionenumyeslist, get_entries, add, or remove
list_idstringcond.Target list ID (required for all actions except list)
record_idstringcond.Record to add or remove (required for add / remove)
limitnumbernoMax entries to return (get_entries only). Default 50, max 200.

Behavior

  • Lists can contain records from any object type, acting as cross-object collections.
  • list returns all available lists for the current user.
  • get_entries returns the records in a list with their object type and display name.

Example

"Add this contact to my priority list"

{
  "action": "add",
  "list_id": "uuid-priority-list",
  "record_id": "uuid-contact"
}

On this page