naftiko: 1.0.0-alpha2 info: label: Salesforce Einstein Discovery API — Stories description: 'Salesforce Einstein Discovery API — Stories. 6 operations. Lead operation: Salesforce Einstein List stories. Self-contained Naftiko capability covering one Salesforce Einstein business surface.' tags: - Salesforce Einstein - Stories 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: discovery-stories baseUri: https://{instance}.salesforce.com/services/data/v58.0 description: Salesforce Einstein Discovery API — Stories business capability. Self-contained, no shared references. resources: - name: wave-stories path: /wave/stories operations: - name: liststories method: GET description: Salesforce Einstein List stories outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: q in: query type: string description: Search query to filter stories by name. - name: pageSize in: query type: integer description: Number of stories to return per page. - name: page in: query type: string description: Page number. - name: createstory method: POST description: Salesforce Einstein Create a story outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: wave-stories-storyId path: /wave/stories/{storyId} operations: - name: getstory method: GET description: Salesforce Einstein Get a story outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updatestory method: PATCH description: Salesforce Einstein Update a story outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: deletestory method: DELETE description: Salesforce Einstein Delete a story outputRawFormat: json outputParameters: - name: result type: object value: $. - name: wave-stories-storyId-stats path: /wave/stories/{storyId}/stats operations: - name: getstorystats method: GET description: Salesforce Einstein Get story statistics outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: bearer token: '{{env.SALESFORCE_EINSTEIN_API_KEY}}' exposes: - type: rest namespace: discovery-stories-rest port: 8080 description: REST adapter for Salesforce Einstein Discovery API — Stories. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/wave/stories name: wave-stories description: REST surface for wave-stories. operations: - method: GET name: liststories description: Salesforce Einstein List stories call: discovery-stories.liststories with: q: rest.q pageSize: rest.pageSize page: rest.page outputParameters: - type: object mapping: $. - method: POST name: createstory description: Salesforce Einstein Create a story call: discovery-stories.createstory with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/wave/stories/{storyid} name: wave-stories-storyid description: REST surface for wave-stories-storyId. operations: - method: GET name: getstory description: Salesforce Einstein Get a story call: discovery-stories.getstory outputParameters: - type: object mapping: $. - method: PATCH name: updatestory description: Salesforce Einstein Update a story call: discovery-stories.updatestory with: body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletestory description: Salesforce Einstein Delete a story call: discovery-stories.deletestory outputParameters: - type: object mapping: $. - path: /v1/wave/stories/{storyid}/stats name: wave-stories-storyid-stats description: REST surface for wave-stories-storyId-stats. operations: - method: GET name: getstorystats description: Salesforce Einstein Get story statistics call: discovery-stories.getstorystats outputParameters: - type: object mapping: $. - type: mcp namespace: discovery-stories-mcp port: 9090 transport: http description: MCP adapter for Salesforce Einstein Discovery API — Stories. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: salesforce-einstein-list-stories description: Salesforce Einstein List stories hints: readOnly: true destructive: false idempotent: true call: discovery-stories.liststories with: q: tools.q pageSize: tools.pageSize page: tools.page outputParameters: - type: object mapping: $. - name: salesforce-einstein-create-story description: Salesforce Einstein Create a story hints: readOnly: false destructive: false idempotent: false call: discovery-stories.createstory with: body: tools.body outputParameters: - type: object mapping: $. - name: salesforce-einstein-get-story description: Salesforce Einstein Get a story hints: readOnly: true destructive: false idempotent: true call: discovery-stories.getstory outputParameters: - type: object mapping: $. - name: salesforce-einstein-update-story description: Salesforce Einstein Update a story hints: readOnly: false destructive: false idempotent: true call: discovery-stories.updatestory with: body: tools.body outputParameters: - type: object mapping: $. - name: salesforce-einstein-delete-story description: Salesforce Einstein Delete a story hints: readOnly: false destructive: true idempotent: true call: discovery-stories.deletestory outputParameters: - type: object mapping: $. - name: salesforce-einstein-get-story-statistics description: Salesforce Einstein Get story statistics hints: readOnly: true destructive: false idempotent: true call: discovery-stories.getstorystats outputParameters: - type: object mapping: $.