Skip to main content
Glama

Cirra AI Salesforce Admin MCP Server

bulk_query

Read-onlyIdempotent

Run a large Salesforce SOQL query via Bulk API 2.0 query jobs. Use this instead of soql_query when you expect thousands of rows or when a REST query times out. Does not support GROUP BY, aggregates, OFFSET, TYPEOF, or parent-to-child subqueries. The tool waits up to 90 seconds; if the job is still running it returns a jobId you can pass back to wait or abort.

Input Schema

NameRequiredDescriptionDefault
abortNoWhen true, abort the query job identified by `jobId`. Requires `jobId`.
jobIdNoExisting query job ID. Pass this to wait for a previously submitted job or to abort it. When set, sObject/fields are ignored.
limitNo(optional) Maximum number of records to return. Omit this for bulk extracts so Salesforce can PK-chunk the query. If you pass LIMIT and the query times out, retry without it.
fieldsNoFields to retrieve. Child-to-parent relationship fields (Account.Name) are supported. Parent-to-child subqueries and aggregate functions are not. Required to start a new job.
orderByNo(optional) ORDER BY clause. Note: ORDER BY and LIMIT disable PK chunking and can make large queries slower or time out.
sObjectNoAPI name of the sObject to query. Required to start a new job.
sf_userNo(optional) Salesforce username to identify the connection to use. Omit this to use the current default connection.
pageSizeNo(optional) Maximum number of records to return per page when the response requires pagination, including the first page. If omitted, the first page is a short preview and later pages use an automatically calculated size.
queryAllNoWhen true, include deleted and archived records (queryAll). Default is false.
whereClauseNoWHERE clause. May include conditions on related objects. Do NOT include APEX snippets or variables: use only literal values. Optional — omit to query all rows of the object.
cirra_ai_teamNo(optional) Cirra team ID or name that owns the Salesforce connection to use for this call. Must be provided together with 'sf_user'. Use it to run against a specific team's connection without changing your default team — e.g. to keep separate chats on Salesforce orgs in different teams. Omit it when this call carries the context_handle from cirra_ai_init, which names the team for the conversation. A user with more than one place to work (several teams, or a team and a personal account) must pass either the context_handle or 'cirra_ai_team' + 'sf_user'.
context_handleNo(recommended) The conversation context handle returned by cirra_ai_init in this conversation. Pass the exact context_handle value from the most recent cirra_ai_init result so this call runs against the team and Salesforce connection selected for this conversation. A user with more than one place to work (several Cirra AI teams, or a team and a personal account) must pass either this handle or 'cirra_ai_team' + 'sf_user'; a call with neither is refused.

Output Schema

NameRequiredDescriptionDefault
messageYes
recordsNo
resultsNo
successYes
warningNo
errorCodeNo
errorCountNo
resultCountNo
artifactTypeNo
requestCountNo
skippedCountNo
successCountNo
artifactCategoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond annotations (readOnly/idempotent/openWorld/destructive=false) by disclosing the 90-second wait behavior and the async escape hatch: a returned jobId can be passed back to wait or abort. This is exactly the operational trait an agent cannot infer from structured fields.

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?

Four short sentences: purpose, routing rule, unsupported constructs, async behavior. Front-loaded and every sentence carries decision-relevant information with no filler.

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?

Output schema exists, so return values needn't be explained, and annotations cover the safety profile; the description still adds the timeout/jobId continuation model. It is slightly thin on the multi-team connection flow (context_handle / cirra_ai_team), though the schema descriptions handle that fully.

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 the baseline is 3; the description earns a bump because it explains why jobId is returned (timeout) and that it can be reused to wait or abort, tying the two-phase workflow together in a way the per-parameter schema text does not. It does not cover the connection/team routing params, but those are fully documented in the schema.

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?

States a specific verb and resource (run a large Salesforce SOQL query) plus the underlying mechanism (Bulk API 2.0 query jobs). It explicitly contrasts with the sibling soql_query, so an agent can select between them without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit routing rule: use this instead of soql_query when expecting thousands of rows or when a REST query times out. It also lists when-not (no GROUP BY, aggregates, OFFSET, TYPEOF, parent-to-child subqueries), leaving little to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources