Skip to main content
Glama
aaronsb

Salesforce MCP Server

execute_soql

Execute SOQL queries on Salesforce objects, including custom fields. Supports pagination and detail level selection for efficient data retrieval.

Instructions

Execute a SOQL query. Supports querying both standard and custom fields (custom fields end with __c in their API names). Use describe_object first to discover available fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSOQL query to execute. For custom fields, use the API name (e.g., Project_Status__c)
pageSizeNoNumber of records per page (default: 25)
pageNumberNoPage number to retrieve (default: 1)
detailNoResponse detail level (default: summary)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavior. It mentions support for custom fields and naming conventions, but lacks details on pagination (pageSize/pageNumber), rate limits, error handling, or authentication requirements. Partial transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: first defines purpose, second provides actionable guidance. No fluff, front-loaded, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 4 parameters, no output schema, and no annotations. The description covers basic function and custom field support but omits pagination behavior, detail enum semantics, and response format. Adequate but incomplete for complex use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining the custom field naming convention (__c) and recommending describe_object, which supplements the schema's field descriptions and clarifies parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes SOQL queries, a specific verb+resource. It distinguishes from siblings like search_opportunities and list_objects by offering raw SOQL execution, which no other sibling provides.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description advises using describe_object first to discover fields, which is a helpful prerequisite. However, it does not provide explicit when-to-use or when-not-to-use guidance, nor compares with alternatives like search_opportunities for filtered queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aaronsb/salesforce-cloud'

If you have feedback or need assistance with the MCP directory API, please join our Discord server