Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Export Records to CSV

sf_export_records
Read-onlyIdempotent

Export Salesforce records as CSV with a SOQL query. Extract, backup, or analyze data with customizable headers and record limits.

Instructions

Exports Salesforce records as CSV data using a SOQL query. Useful for data extraction, backup, or analysis.

soql: the SOQL query to run (SELECT fields FROM Object WHERE ...) includeHeader: include column headers in the CSV output (default: true) maxRecords: maximum records to export (default: 50000 — use Bulk API for larger datasets)

Returns the CSV content as a string. For very large exports (>50k records), use sf_bulk_import_records with operation='query' instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum records to export
queryYesFull SOQL query string
formatNoExport format: json or csv
includeHeadersNoInclude CSV header row
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so description need not repeat that. The description adds return type ('Returns the CSV content as a string') and defaults, but it introduces conflicting parameter names (soql, includeHeader, maxRecords) versus the schema's query, includeHeaders, limit, and it omits the format parameter entirely, creating confusion.

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

Conciseness3/5

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

The description is relatively brief and front-loaded with the main purpose. But the inline parameter documentation is redundant and inconsistent with the schema, adding noise rather than clarity. It could be shortened to reference the schema parameters instead of duplicating them with different names.

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

Completeness2/5

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

The description is missing semantics for the 'format' parameter, which can output JSON or CSV per schema, yet the description only mentions CSV. It also does not explain how the returned string is structured or provide pagination details, and the parameter naming mismatch further reduces completeness. The absence of an output schema makes these omissions more significant.

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

Parameters2/5

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

Schema description coverage is 100%, giving baseline 3. However, the description's parameter list uses names that don't match the schema: 'soql' vs 'query', 'includeHeader' vs 'includeHeaders', 'maxRecords' vs 'limit'. It also fails to mention the 'format' parameter. This actively misleads the agent and decreases clarity below baseline.

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 states a clear action ('Exports Salesforce records') with a specific format ('as CSV data') and method ('using a SOQL query'). This distinguishes it from sibling tools like sf_query_records (which likely returns structured query results) and sf_bulk_import_records (import-focused).

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

Usage Guidelines4/5

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

It provides explicit use cases ('data extraction, backup, or analysis') and an alternative for large datasets ('For very large exports (>50k records), use sf_bulk_import_records with operation='query' instead'). However, it does not contrast with sf_query_records or specify when JSON format (from schema) is preferred over CSV.

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/semwalajay83-sem/salesforce-metadata-mcp'

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