Skip to main content
Glama
salesforce-mcp

salesforce-mcp

by uoparaji

salesforce_query

Execute SOQL queries against Salesforce orgs and return the first batch of up to 2,000 records for analysis, reporting, or automation.

Instructions

Execute a SOQL query (returns first batch, up to 2000 records)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "salesforce_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe SOQL query to execute

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations present, the description carries the full behavioral burden. It does disclose the key return trait, that only the first batch of up to 2000 records comes back, which is valuable, but it says nothing about read-only safety, permissions, SOQL row limits, or what happens on truncation.

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?

One tight sentence with the resource and the result-size caveat front-loaded. Nothing is wasted and nothing needs reordering, even if more could have been said.

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?

Without an output schema, the description must explain what comes back, and it does so partially, with the batch size. However, it omits the pagination handoff to query_more and the read-only nature, which are the two facts an agent most needs before calling it.

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

Parameters3/5

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

There is a single parameter, 'query', documented at 100% schema coverage, so the baseline is 3. The description adds no syntax guidance, examples, or constraints beyond what the schema already states.

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

Purpose4/5

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

The description gives a specific verb-plus-resource: execute a SOQL query. It is clearly distinguishable from siblings like create_record or describe_object, but it does not distinguish itself from the near-identical salesforce_query_all or salesforce_tooling_query.

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?

There is no explicit statement of when to use this versus query_all or query_more. The parenthetical about returning only the first batch implies that query_more exists for continuation, but the agent must infer that routing rather than being told.

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