Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create Einstein Prediction (ML Prediction Definition)

sf_create_einstein_prediction
Idempotent

Create an Einstein Prediction Builder definition to analyze historical Salesforce data and automatically score or classify records.

Instructions

Creates an Einstein Prediction Builder prediction definition (MLPredictionDefinition metadata type). Predictions analyze historical Salesforce data to score or classify records automatically.

predictionType:

  • BinaryClassification: predict a yes/no outcome (e.g. Will this opportunity close? Is this lead likely to convert?)

  • Regression: predict a numeric value (e.g. Expected revenue, likelihood score)

targetField: the field the prediction is based on (e.g. 'IsWon' for BinaryClassification on Opportunity) pushbackField: an existing custom field to write the prediction score to automatically

IMPORTANT: Einstein Prediction Builder requires an Einstein Analytics license or the Einstein Platform add-on. If the org lacks this license, the metadata deployment will succeed but the prediction cannot be trained or activated. This tool creates the definition — training happens in Setup → Einstein → Prediction Builder.

The prediction is created in Draft status. Activate it from Setup after training is complete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesPrediction display label
objectNameNoAlias for objectApiName
descriptionNoPrediction description
targetFieldYesField API name to predict, e.g. 'IsWon'. Deployed as <predictionField> together with objectApiName.
negativeLabelNoLabel for negative outcome (BinaryClassification only)No
objectApiNameNoSalesforce object to run predictions on, e.g. 'Opportunity'
positiveLabelNoLabel for positive outcome (BinaryClassification only)Yes
pushbackFieldNoField to write the prediction score to, e.g. 'Win_Score__c'
predictionNameYesPrediction API name
predictionTypeYesBinaryClassification/Classification for yes/no, Regression for numeric
aiApplicationDeveloperNameYesREQUIRED by Salesforce. API name of an existing AIApplication that owns this prediction — Einstein Prediction Builder creates one per app. The deploy fails with 'Required field is missing: aiApplicationDeveloperName' without it.
Behavior4/5

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

Annotations already indicate idempotent and openWorld hints, readOnly false. The description adds valuable beyond-annotation context: deployment may succeed even without a license, predictions are created in Draft status, and training/activation must be done externally. It also mentions pushbackField auto-writes the score. No contradiction with annotations.

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?

The description is well-structured with a clear opening, parameter explanations, and an IMPORTANT callout for licensing. It's a bit longer than minimal but every sentence serves a purpose for an 11-parameter tool. The front-loaded 'Creates' statement establishes purpose immediately.

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?

Given no output schema and moderate complexity, the description covers prerequisites (license), workflow (create → train → activate), and status (Draft). It does not describe return values, but that is acceptable since no output schema exists and the rule says description needn't explain return values if output schema exists; here it's not critical. The tool's role in the larger process is clear.

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?

The input schema has 100% coverage, so the baseline is 3. The description goes beyond the schema by giving real-world examples for predictionType (e.g., 'Will this opportunity close?'), targetField (e.g., 'IsWon'), and pushbackField (e.g., 'Win_Score__c'). It also explains the relationship between targetField and objectApiName, adding practical meaning.

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 opens with a specific verb and resource: 'Creates an Einstein Prediction Builder prediction definition (MLPredictionDefinition metadata type).' It clearly differentiates this from sibling tools like sf_create_einstein_bot by focusing on ML prediction definitions, with detailed type examples (BinaryClassification vs Regression).

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?

The description provides clear context on when to use this tool (to create the prediction definition) and explicitly warns about the Einstein Analytics license prerequisite and that training happens in Setup, not through this tool. It doesn't explicitly name alternative tools, but no close sibling exists, so the scope is adequately clarified.

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