Salesforce Einstein · Capability

Salesforce Einstein Prediction Builder API — Prediction Definitions

Salesforce Einstein Prediction Builder API — Prediction Definitions. 5 operations. Lead operation: Salesforce Einstein List prediction definitions. Self-contained Naftiko capability covering one Salesforce Einstein business surface.

Run with Naftiko Salesforce EinsteinPrediction Definitions

What You Can Do

GET
Listpredictiondefinitions — Salesforce Einstein List prediction definitions
/v1/einstein/prediction-definitions
POST
Createpredictiondefinition — Salesforce Einstein Create a prediction definition
/v1/einstein/prediction-definitions
GET
Getpredictiondefinition — Salesforce Einstein Get a prediction definition
/v1/einstein/prediction-definitions/{predictiondefinitionid}
PATCH
Updatepredictiondefinition — Salesforce Einstein Update a prediction definition
/v1/einstein/prediction-definitions/{predictiondefinitionid}
DELETE
Deletepredictiondefinition — Salesforce Einstein Delete a prediction definition
/v1/einstein/prediction-definitions/{predictiondefinitionid}

MCP Tools

salesforce-einstein-list-prediction-definitions

Salesforce Einstein List prediction definitions

read-only idempotent
salesforce-einstein-create-prediction-definition

Salesforce Einstein Create a prediction definition

salesforce-einstein-get-prediction-definition

Salesforce Einstein Get a prediction definition

read-only idempotent
salesforce-einstein-update-prediction-definition

Salesforce Einstein Update a prediction definition

idempotent
salesforce-einstein-delete-prediction-definition

Salesforce Einstein Delete a prediction definition

idempotent

Capability Spec

prediction-builder-prediction-definitions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Salesforce Einstein Prediction Builder API — Prediction Definitions
  description: 'Salesforce Einstein Prediction Builder API — Prediction Definitions. 5 operations. Lead operation: Salesforce
    Einstein List prediction definitions. Self-contained Naftiko capability covering one Salesforce Einstein business surface.'
  tags:
  - Salesforce Einstein
  - Prediction Definitions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SALESFORCE_EINSTEIN_API_KEY: SALESFORCE_EINSTEIN_API_KEY
capability:
  consumes:
  - type: http
    namespace: prediction-builder-prediction-definitions
    baseUri: https://{instance}.salesforce.com/services/data/v58.0
    description: Salesforce Einstein Prediction Builder API — Prediction Definitions business capability. Self-contained,
      no shared references.
    resources:
    - name: einstein-prediction-definitions
      path: /einstein/prediction-definitions
      operations:
      - name: listpredictiondefinitions
        method: GET
        description: Salesforce Einstein List prediction definitions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createpredictiondefinition
        method: POST
        description: Salesforce Einstein Create a prediction definition
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: einstein-prediction-definitions-predictionDefinitionId
      path: /einstein/prediction-definitions/{predictionDefinitionId}
      operations:
      - name: getpredictiondefinition
        method: GET
        description: Salesforce Einstein Get a prediction definition
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatepredictiondefinition
        method: PATCH
        description: Salesforce Einstein Update a prediction definition
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletepredictiondefinition
        method: DELETE
        description: Salesforce Einstein Delete a prediction definition
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.SALESFORCE_EINSTEIN_API_KEY}}'
  exposes:
  - type: rest
    namespace: prediction-builder-prediction-definitions-rest
    port: 8080
    description: REST adapter for Salesforce Einstein Prediction Builder API — Prediction Definitions. One Spectral-compliant
      resource per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/einstein/prediction-definitions
      name: einstein-prediction-definitions
      description: REST surface for einstein-prediction-definitions.
      operations:
      - method: GET
        name: listpredictiondefinitions
        description: Salesforce Einstein List prediction definitions
        call: prediction-builder-prediction-definitions.listpredictiondefinitions
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createpredictiondefinition
        description: Salesforce Einstein Create a prediction definition
        call: prediction-builder-prediction-definitions.createpredictiondefinition
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/einstein/prediction-definitions/{predictiondefinitionid}
      name: einstein-prediction-definitions-predictiondefinitionid
      description: REST surface for einstein-prediction-definitions-predictionDefinitionId.
      operations:
      - method: GET
        name: getpredictiondefinition
        description: Salesforce Einstein Get a prediction definition
        call: prediction-builder-prediction-definitions.getpredictiondefinition
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatepredictiondefinition
        description: Salesforce Einstein Update a prediction definition
        call: prediction-builder-prediction-definitions.updatepredictiondefinition
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletepredictiondefinition
        description: Salesforce Einstein Delete a prediction definition
        call: prediction-builder-prediction-definitions.deletepredictiondefinition
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: prediction-builder-prediction-definitions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Salesforce Einstein Prediction Builder API — Prediction Definitions. One tool per consumed
      operation, routed inline through this capability's consumes block.
    tools:
    - name: salesforce-einstein-list-prediction-definitions
      description: Salesforce Einstein List prediction definitions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prediction-builder-prediction-definitions.listpredictiondefinitions
      outputParameters:
      - type: object
        mapping: $.
    - name: salesforce-einstein-create-prediction-definition
      description: Salesforce Einstein Create a prediction definition
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: prediction-builder-prediction-definitions.createpredictiondefinition
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: salesforce-einstein-get-prediction-definition
      description: Salesforce Einstein Get a prediction definition
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: prediction-builder-prediction-definitions.getpredictiondefinition
      outputParameters:
      - type: object
        mapping: $.
    - name: salesforce-einstein-update-prediction-definition
      description: Salesforce Einstein Update a prediction definition
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: prediction-builder-prediction-definitions.updatepredictiondefinition
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: salesforce-einstein-delete-prediction-definition
      description: Salesforce Einstein Delete a prediction definition
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: prediction-builder-prediction-definitions.deletepredictiondefinition
      outputParameters:
      - type: object
        mapping: $.