naftiko: 1.0.0-alpha2 info: label: Salesforce Einstein Predictive Intelligence description: Workflow capability combining Einstein Prediction Builder and Einstein Discovery APIs for AI-driven predictive analytics. Manage prediction definitions, retrieve AI record insights, analyze Einstein Discovery stories, and use prediction models for business intelligence. Designed for Salesforce admins, data scientists, and business analysts building intelligent CRM workflows. tags: - Analytics - Artificial Intelligence - Business Intelligence - Machine Learning - Predictive Analytics - Salesforce Einstein created: '2026-05-02' modified: '2026-05-06' binds: - namespace: env keys: SALESFORCE_OAUTH2_TOKEN: SALESFORCE_OAUTH2_TOKEN SALESFORCE_INSTANCE_URL: SALESFORCE_INSTANCE_URL capability: consumes: - type: http namespace: einstein-prediction-builder baseUri: '{{env.SALESFORCE_INSTANCE_URL}}/services/data/v58.0' description: Salesforce Einstein Prediction Builder REST API. authentication: type: bearer token: '{{env.SALESFORCE_OAUTH2_TOKEN}}' resources: - name: prediction-definitions path: /einstein/prediction-definitions description: Einstein prediction definitions for custom AI models. operations: - name: list-prediction-definitions method: GET description: List all Einstein prediction definitions in the org. outputRawFormat: json outputParameters: - name: predictionDefinitions type: object value: $. - name: create-prediction-definition method: POST description: Create a new Einstein prediction definition. outputRawFormat: json outputParameters: - name: predictionDefinition type: object value: $. body: type: json data: name: '{{tools.name}}' predictionField: '{{tools.predictionField}}' outcomeGoal: '{{tools.outcomeGoal}}' - name: get-prediction-definition method: GET description: Get details of a specific prediction definition. inputParameters: - name: predictionDefinitionId in: path type: string required: true description: Prediction definition ID. outputRawFormat: json outputParameters: - name: predictionDefinition type: object value: $. - name: update-prediction-definition method: PATCH description: Update an existing prediction definition. inputParameters: - name: predictionDefinitionId in: path type: string required: true description: Prediction definition ID. outputRawFormat: json outputParameters: - name: predictionDefinition type: object value: $. body: type: json data: name: '{{tools.name}}' - name: delete-prediction-definition method: DELETE description: Delete a prediction definition. inputParameters: - name: predictionDefinitionId in: path type: string required: true description: Prediction definition ID. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: list-predictions method: GET description: List prediction results for a definition. inputParameters: - name: predictionDefinitionId in: path type: string required: true description: Prediction definition ID. - name: recordId in: query type: string required: false description: Filter predictions by Salesforce record ID. - name: limit in: query type: integer required: false description: Maximum number of predictions to return. outputRawFormat: json outputParameters: - name: predictions type: object value: $. - name: ai-record-insights path: /einstein/ai-record-insights description: AI-generated insights for Salesforce records. operations: - name: get-ai-record-insights method: POST description: Get AI insights for specified Salesforce records. outputRawFormat: json outputParameters: - name: insights type: object value: $. body: type: json data: predictionDefinition: '{{tools.predictionDefinition}}' inputRecords: '{{tools.inputRecords}}' - type: http namespace: einstein-discovery baseUri: '{{env.SALESFORCE_INSTANCE_URL}}/services/data/v58.0' description: Salesforce Einstein Discovery (Wave Analytics) REST API. authentication: type: bearer token: '{{env.SALESFORCE_OAUTH2_TOKEN}}' resources: - name: stories path: /wave/stories description: Einstein Discovery stories for AI-powered analytics. operations: - name: list-stories method: GET description: List all Einstein Discovery stories. inputParameters: - name: q in: query type: string required: false description: Search query to filter stories by name. - name: pageSize in: query type: integer required: false description: Number of stories to return per page. outputRawFormat: json outputParameters: - name: stories type: object value: $. - name: create-story method: POST description: Create a new Einstein Discovery story from a dataset. outputRawFormat: json outputParameters: - name: story type: object value: $. body: type: json data: name: '{{tools.name}}' datasetId: '{{tools.datasetId}}' label: '{{tools.label}}' - name: get-story method: GET description: Get details of a specific Einstein Discovery story. inputParameters: - name: storyId in: path type: string required: true description: Story ID. outputRawFormat: json outputParameters: - name: story type: object value: $. - name: delete-story method: DELETE description: Delete an Einstein Discovery story. inputParameters: - name: storyId in: path type: string required: true description: Story ID. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: get-story-stats method: GET description: Get statistical insights from an Einstein Discovery story. inputParameters: - name: storyId in: path type: string required: true description: Story ID. outputRawFormat: json outputParameters: - name: stats type: object value: $. - name: models path: /wave/models description: Einstein Discovery prediction models. operations: - name: list-models method: GET description: List all Einstein Discovery prediction models. inputParameters: - name: pageSize in: query type: integer required: false description: Number of models to return per page. outputRawFormat: json outputParameters: - name: models type: object value: $. - name: get-model method: GET description: Get a specific Einstein Discovery prediction model. inputParameters: - name: modelId in: path type: string required: true description: Model ID. outputRawFormat: json outputParameters: - name: model type: object value: $. - name: dashboards path: /wave/dashboards description: Einstein Analytics dashboards. operations: - name: list-dashboards method: GET description: List all Einstein Analytics dashboards. inputParameters: - name: pageSize in: query type: integer required: false description: Number of dashboards per page. outputRawFormat: json outputParameters: - name: dashboards type: object value: $. - name: get-dashboard method: GET description: Get a specific analytics dashboard. inputParameters: - name: dashboardId in: path type: string required: true description: Dashboard ID. outputRawFormat: json outputParameters: - name: dashboard type: object value: $. exposes: - type: rest port: 8082 namespace: einstein-predictive-intelligence-api description: Unified REST API for Salesforce Einstein predictive intelligence. resources: - path: /v1/prediction-definitions name: prediction-definitions description: Einstein prediction definitions. operations: - method: GET name: list-prediction-definitions description: List all Einstein prediction definitions. call: einstein-prediction-builder.list-prediction-definitions outputParameters: - type: object mapping: $. - method: POST name: create-prediction-definition description: Create a new Einstein prediction definition. call: einstein-prediction-builder.create-prediction-definition outputParameters: - type: object mapping: $. - path: /v1/prediction-definitions/{id}/predictions name: predictions description: Prediction results for a definition. operations: - method: GET name: list-predictions description: List prediction results for a definition. call: einstein-prediction-builder.list-predictions with: predictionDefinitionId: rest.id outputParameters: - type: object mapping: $. - path: /v1/ai-record-insights name: ai-record-insights description: AI-generated insights for Salesforce records. operations: - method: POST name: get-ai-record-insights description: Get AI insights for specified Salesforce records. call: einstein-prediction-builder.get-ai-record-insights outputParameters: - type: object mapping: $. - path: /v1/stories name: stories description: Einstein Discovery analytics stories. operations: - method: GET name: list-stories description: List all Einstein Discovery stories. call: einstein-discovery.list-stories outputParameters: - type: object mapping: $. - method: POST name: create-story description: Create a new Einstein Discovery story. call: einstein-discovery.create-story outputParameters: - type: object mapping: $. - path: /v1/stories/{id}/stats name: story-stats description: Statistical insights from a Discovery story. operations: - method: GET name: get-story-stats description: Get statistical insights from an Einstein Discovery story. call: einstein-discovery.get-story-stats with: storyId: rest.id outputParameters: - type: object mapping: $. - path: /v1/models name: models description: Einstein Discovery prediction models. operations: - method: GET name: list-models description: List Einstein Discovery prediction models. call: einstein-discovery.list-models outputParameters: - type: object mapping: $. - path: /v1/dashboards name: dashboards description: Einstein Analytics dashboards. operations: - method: GET name: list-dashboards description: List Einstein Analytics dashboards. call: einstein-discovery.list-dashboards outputParameters: - type: object mapping: $. - type: mcp port: 9092 namespace: einstein-predictive-intelligence-mcp transport: http description: MCP server for AI-assisted Salesforce Einstein predictive intelligence. tools: - name: list-prediction-definitions description: List all Einstein Prediction Builder definitions in the org. hints: readOnly: true idempotent: true call: einstein-prediction-builder.list-prediction-definitions outputParameters: - type: object mapping: $. - name: get-ai-record-insights description: Get AI-generated insights and prediction factors for Salesforce records. hints: readOnly: true idempotent: true call: einstein-prediction-builder.get-ai-record-insights outputParameters: - type: object mapping: $. - name: list-predictions description: List prediction results for a given Einstein Prediction Builder definition. hints: readOnly: true idempotent: true call: einstein-prediction-builder.list-predictions outputParameters: - type: object mapping: $. - name: list-discovery-stories description: List all Einstein Discovery analytics stories. hints: readOnly: true idempotent: true call: einstein-discovery.list-stories outputParameters: - type: object mapping: $. - name: get-story-stats description: Get statistical insights and key findings from an Einstein Discovery story. hints: readOnly: true idempotent: true call: einstein-discovery.get-story-stats with: storyId: tools.storyId outputParameters: - type: object mapping: $. - name: list-discovery-models description: List Einstein Discovery prediction models for advanced analytics. hints: readOnly: true idempotent: true call: einstein-discovery.list-models outputParameters: - type: object mapping: $. - name: list-analytics-dashboards description: List Einstein Analytics dashboards for business intelligence. hints: readOnly: true idempotent: true call: einstein-discovery.list-dashboards outputParameters: - type: object mapping: $. - name: create-discovery-story description: Create a new Einstein Discovery story from a dataset for automated insights. hints: readOnly: false destructive: false call: einstein-discovery.create-story outputParameters: - type: object mapping: $.