run_soql_query
Execute SOQL queries to retrieve specific data from Salesforce objects. Use this tool to query records by fields, conditions, and relationships with proper syntax and limits.
Instructions
Execute a SOQL query. SOQL syntax: SELECT fields FROM Object WHERE conditions ORDER BY field LIMIT n
Use SOQL when you know which object to query. Use run_sosl_search instead when
searching by keyword across multiple objects.
Common objects: Account, Contact, Lead, Opportunity, Case, Task, Event, User.
Custom objects end in __c. Custom fields end in __c.
Relationship queries use dot notation for parent (SELECT Contact.Account.Name FROM Contact)
and subqueries for children (SELECT Name, (SELECT LastName FROM Contacts) FROM Account).
Always include LIMIT to avoid large result sets. Call describe_object first if you
don't know the available fields. Results include totalSize, done, and records array.Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |