Salesforce

Query Salesforce

salesforce_query · Reads only · Markdown

Runs one SOQL SELECT statement and returns up to 200 records.

Free*

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

An example

What are Hotel Seeblick's latest opportunities?

Your agent callssalesforce_queryFree*

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
{
  "soql": "SELECT Id, Name, StageName, Amount FROM Opportunity WHERE Account.Name = 'Hotel Seeblick' ORDER BY CloseDate DESC LIMIT 5"
}
What comes back
{
  "records": [
    {
      "Id": "0065g00000Xy1AbAAJ",
      "Name": "Combi steamers",
      "StageName": "Proposal",
      "Amount": 18400,
      "CloseDate": "2026-11-09"
    }
  ],
  "total": 1,
  "more": false
}

Use it when

The agent needs records that match conditions: an account's opportunities, open cases.

What it does

Run one SOQL SELECT statement in the company's org and get its records, up to 200; more says when there are others. Only reading. Free.

What comes back

records, total, and more when there are others. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
soqlRequiredstring10 to 4,000 characters.

The call

Over MCP, call salesforce_query on https://api.conecto.chat/mcp/salesforce. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/salesforce_query \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"soql":"SELECT Id, Name, StageName, Amount FROM Opportunity WHERE Account.Name = '\''Hotel Seeblick'\'' ORDER BY CloseDate DESC LIMIT 5"}'

When it refuses

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

CodeWhenWhat to do
not_connected409Salesforce isn't connected yet.Connect it with salesforce_connect.
vendor_rejected502Salesforce refused: the app's keys, or the run-as user may not do that.Give the run-as user the permission the message names.
invalid_input400Salesforce refused the query or the fields, or the object or id is not one.Fix what the message names; field names are API names, like StageName.

Give this to your agent.

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