An MCP server for interacting with Salesforce, enabling SOQL queries, data model inspection, nested record generation, and record insertion via the Composite Tree API.
This server has several critical definition quality issues that severely limit its usability in a production agent context. While tool naming generally follows verb patterns (query_*, get_*, describe_*, insert_*, generate_*), multiple tools lack adequate parameter descriptions, and the server exhibits a fundamental architectural flaw: it directly exposes LLM sampling as a tool parameter ('ctx: Context'), which violates separation of concerns and makes the tool non-portable across different MCP clients. Tool descriptions vary from adequate (query_salesforce: 61 chars) to incomplete (describe_sobject: 61 chars). Five of six tools have zero or near-zero parameter descriptions for critical parameters. The generate_nested_record tool is particularly problematic: it accepts a 'ctx' parameter (MCP Context object for sampling) that should never be exposed as a tool parameter, this couples the tool implementation to the MCP framework and makes it impossible for other clients to invoke this tool. Output schemas are mostly undocumented except for generate_nested_record (which returns ResultType). Error handling is absent, there are no try-catch blocks, no fallback guidance, and no actionable error messages. The server would fail silently or return raw Python exceptions to agents. Baseline comparison: average production tool description is 194 chars; this server averages ~95 chars. Average params per tool is 4; this server has 1-2, but those that exist lack descriptions.
returns the fields of a specific sObject in the salesforce scratch org
Generate a nested Salesforce record according to the user specification. Includes the describe_sobject tool to look up sObject schemas and their fields when needed, as well as tree_api_record_example.
Get the basic data model of the scratch org.This includes the sObjects Account, Contact, Case and User with their respective creatable fields.
Insert a record or nested record into the salesforce scratch org. The root_sobject parameter specifies the sObject type of the top-level record in the provided record, which is required for the Salesforce Composite Tree API endpoint.
Run a Salesforce SOQL query against the connected scratch org.
generate_nested_record exposes MCP Context object ('ctx' parameter) as a tool parameter. This violates the tool-as-portable-interface principle and couples the implementation to fastmcp. Sampling should be internal to tool logic or negotiated at protocol level, not exposed as a parameter. This tool cannot be invoked by any MCP client that doesn't have this exact parameter structure.
No error handling or recovery guidance. Tools like query_salesforce, insert_record, and describe_sobject lack try-catch blocks and error messages. If Salesforce API fails, the agent receives a raw Python exception with no actionable guidance (e.g., 'Authentication failed. Check CLIENT_ID and PRIVATE_KEY.' or 'Invalid SOQL syntax. Review the Salesforce SOQL reference.').
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 53 | 2025-06-18+ | v2 |
| 2026-03-09 | F | 39 | - | v1 |
example of a nested record that is compatible with the Salesforce Composite Tree API
Parameter descriptions are missing or inadequate. sobject_name in describe_sobject has no description; root_sobject and record in insert_record lack actionable descriptions of format/constraints; user_specification in generate_nested_record is vague ('user specification' is tautological, what format? length? constraints?). Baseline: 100% of A+ tools have descriptions for every parameter.
Output schemas are undocumented for most tools. query_salesforce, get_basic_datamodel, describe_sobject, insert_record, and tree_api_record_example return dicts with no schema documentation. Agents cannot infer what fields to expect, forcing them to guess or make additional discovery calls. Baseline: 100% of A+ tools have documented return types.
insert_record is destructive (WRITE operation) but has no confirmation step, dry-run mode, or warning in description. Agents could accidentally insert malformed records into production Salesforce. Description should state: 'This tool MODIFIES state in Salesforce. Use with caution. Inserted records cannot be rolled back from this tool.'
Credentials injected as environment variables (CLIENT_ID, PRIVATE_KEY, USERNAME) but OPENAI_API_KEY is passed to sampling handler at module level. If trace logs capture initialization code, API keys leak. Additionally, Settings loads from .env file with no validation, if .env is malformed, the server crashes without guidance.
generate_nested_record depends on external JSON file (tree_api_record.json) for a tool example, but this file is not provided in the source. If the file is missing, tree_api_record_example() fails silently or returns a cryptic file-not-found error. The server should embed the example or provide clearer fallback.
Tool descriptions do not explain WHEN to use each tool or what the agent should expect. E.g., describe_sobject says 'returns the fields' but does not say 'Call this before generate_nested_record to validate field names' or 'Returns createable fields only.' Baseline: descriptions should answer What, When, and What-it-returns.
No pagination or result-limiting for query_salesforce. A SOQL query that returns 10,000 records will dump them all into the response, blowing the agent's context window. Queries should accept a LIMIT parameter and return a total_count or next_cursor. Baseline: tools returning lists must support pagination.