CRM

Find deals

crm_find_deals · Reads only · Markdown

Finds deals by pipeline, stage, status, company or contact, by filters on any field or tag, or by a saved segment.

Free*

*Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads.

An example

Which open deals haven't moved in two weeks?

Your agent callscrm_find_dealsFree*

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "status": "open",
  "filters": [
    {
      "field": "stage_entered_at",
      "op": "lt",
      "value": "today-14"
    }
  ]
}
What comes back
{
  "deals": [
    {
      "id": 4101,
      "title": "Hotel Elbblick kitchen",
      "pipeline": "Sales",
      "pipeline_id": 4101,
      "stage": "Proposal",
      "stage_id": 4104,
      "status": "open",
      "probability": 60,
      "amount": "38600.00",
      "weighted_amount": "23160.00",
      "currency": "EUR",
      "close_date": "2026-11-20",
      "next_step": "Send the quote for two combi steamers and a dishwasher",
      "description": "",
      "lost_reason": null,
      "company_id": 4101,
      "contact_id": 4102,
      "tags": [],
      "custom_fields": {},
      "stage_entered_at": "2026-09-23T08:00:00+00:00",
      "closed_at": null,
      "updated_at": "2026-10-14T08:00:00+00:00"
    }
  ],
  "count": 1,
  "total": 1,
  "next_offset": null
}

Use it when

Someone asks about the pipeline: open deals, stuck deals, deals closing this month.

What it does

Deals by pipeline, stage, status (open, won, lost), company or contact, or by filters on any field, tag or custom field, or by a saved segment; most recently changed first unless `sort` says otherwise. Deals that have not moved in 14 days: filters [{"field": "status", "op": "eq", "value": "open"}, {"field": "stage_entered_at", "op": "lt", "value": "today-14"}].

What comes back

A page of deals with their pipeline, stage, amounts, dates, company and contact, how many are on it, the total and next_offset. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
pipelinestringUp to 80 characters.
stagestringUp to 60 characters.
statusstringOne of: open,won,lost.
company_idintegerAt least 1.
contact_idintegerAt least 1.
querystringUp to 200 characters.
filtersarray of objectsConditions that must all match, e.g. [{"field": "lifecycle_stage", "op": "eq", "value": "customer"}, {"field": "renewal_date", "op": "lte", "value": "today+30"}]. field: a standard field, "tag", or a custom field key (crm_list_fields lists them all). op: eq, ne, contains, starts_with, in (value is a list), gt, gte, lt, lte, is_empty, is_set. Dates take YYYY-MM-DD or today, today+N, today-N. Up to 20 items.
filters[].fieldRequiredstring1 to 60 characters.
filters[].opRequiredstringOne of: contains,eq,gt,gte,in,is_empty,is_set,lt,lte,ne,starts_with.
filters[].valueanyText, a number, true/false, a date, or a list for "in".
tagstringOnly records with this tag. Up to 60 characters.
segmentstringA saved segment (crm_save_segment), by name or id. Up to 80 characters.
sortstringField to sort by, "-" first for descending, e.g. "-amount" or "renewal_date". Up to 61 characters.
limitinteger1 to 100. Default: 25.
offsetintegerAt least 0. Default: 0.

The call

Over MCP, call crm_find_deals on https://api.conecto.chat/mcp/crm. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/crm_find_deals \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"open","filters":[{"field":"stage_entered_at","op":"lt","value":"today-14"}]}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No pipeline, or no stage in it, has that name or id.Call crm_list_pipelines and use a pipeline and stage from it.
invalid_input400A filter or the sort names a field the object does not have, uses an op that does not fit the field, or compares it with the wrong kind of value.Check the fields with crm_list_fields and use one of the ops the message lists.
not_found404No saved segment of that object has that name or id.Call crm_list_segments; the message also names the saved segments.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md