Skip to main content
Glama
salesforce-mcp

salesforce-mcp

by uoparaji

salesforce_query_all

Runs SOQL queries with automatic pagination to fetch all matching Salesforce records and cap result size using maxRecords.

Instructions

Execute a SOQL query with automatic pagination to retrieve all matching records. Use maxRecords to cap the result size.

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_all"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe SOQL query to execute
maxRecordsNoMaximum number of records to fetch (default 10000). Use this to prevent accidentally pulling too much data.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It discloses the one important trait, automatic pagination, but says nothing about cost against API/governor limits, how many internal round-trips occur, whether pagination can be interrupted, ordering guarantees, or what happens with very large queries. For a query tool with no annotation coverage this is thin.

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

Conciseness4/5

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

Two sentences, front-loaded with the core action and its defining trait, with no filler. Slightly more useful if the second sentence pointed at a sibling instead of repeating the schema's cap advice.

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

Completeness4/5

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

For a two-parameter read-only query tool with no output schema, the description covers what the tool does and the one behavior an agent could not see from structure (automatic pagination). Missing pieces are secondary: how results relate to sibling query tools and any API-limit cost.

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?

Schema coverage is 100%, so both parameters are already documented with types and meaning, establishing the baseline of 3. The description only restates the maxRecords purpose already present in the schema and adds no syntax, format, or boundary details (e.g., behavior when maxRecords is omitted vs. exceeded).

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?

States a specific verb and resource ('Execute a SOQL query') plus the distinguishing behavior ('automatic pagination to retrieve all matching records'). It implicitly separates itself from a plain query tool, but it never names salesforce_query or salesforce_query_more, so the agent must infer the distinction from behavior alone.

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?

Implied usage is clear (large/unbounded result sets, hence 'all matching records' and the cap advice), and it gives one concrete recommendation about maxRecords. There is no explicit when-to-use/when-not guidance and no named alternative for non-paginated or continuation queries.

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