run_soql_query
Run raw SOQL queries to fetch Salesforce records with filtering, joins, aggregates, and ORDER BY. Read-only access supports pagination via next_url; include LIMIT for exploratory queries.
Instructions
Run a raw SOQL query against the Salesforce org. Read-only — SOQL cannot modify data. Use this as the escape hatch for anything the other tools don't cover: filtering, joins via relationship fields, aggregates, ORDER BY. Always include a LIMIT for exploratory queries. If a field or object name errors, check the exact API names with describe_object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | SOQL query, e.g. SELECT Id, Name FROM Account WHERE Industry = 'Energy' ORDER BY Name LIMIT 50 | |
| next_url | No | Pagination cursor: pass the next_url value returned by a previous call to fetch the next page. When set, query is ignored. |