naftiko: 1.0.0-alpha2 info: label: Prisma Optimize API — Queries description: 'Prisma Optimize API — Queries. 3 operations. Lead operation: Prisma Ingest query execution data. Self-contained Naftiko capability covering one Prisma business surface.' tags: - Prisma - Queries created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PRISMA_API_KEY: PRISMA_API_KEY capability: consumes: - type: http namespace: optimize-queries baseUri: https://optimize.prisma-data.net description: Prisma Optimize API — Queries business capability. Self-contained, no shared references. resources: - name: ingest path: /ingest operations: - name: ingestquerydata method: POST description: Prisma Ingest query execution data outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: sessions-sessionId-queries path: /sessions/{sessionId}/queries operations: - name: listsessionqueries method: GET description: Prisma List queries from a session outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orderBy in: query type: string description: Sort queries by the specified field - name: order in: query type: string description: Sort direction - name: sessions-sessionId-queries-queryId path: /sessions/{sessionId}/queries/{queryId} operations: - name: getquerydetails method: GET description: Prisma Get query details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: queryId in: path type: string description: Unique identifier of the recorded query required: true authentication: type: apikey key: Authorization value: '{{env.PRISMA_API_KEY}}' placement: header exposes: - type: rest namespace: optimize-queries-rest port: 8080 description: REST adapter for Prisma Optimize API — Queries. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/ingest name: ingest description: REST surface for ingest. operations: - method: POST name: ingestquerydata description: Prisma Ingest query execution data call: optimize-queries.ingestquerydata with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/sessions/{sessionid}/queries name: sessions-sessionid-queries description: REST surface for sessions-sessionId-queries. operations: - method: GET name: listsessionqueries description: Prisma List queries from a session call: optimize-queries.listsessionqueries with: orderBy: rest.orderBy order: rest.order outputParameters: - type: object mapping: $. - path: /v1/sessions/{sessionid}/queries/{queryid} name: sessions-sessionid-queries-queryid description: REST surface for sessions-sessionId-queries-queryId. operations: - method: GET name: getquerydetails description: Prisma Get query details call: optimize-queries.getquerydetails with: queryId: rest.queryId outputParameters: - type: object mapping: $. - type: mcp namespace: optimize-queries-mcp port: 9090 transport: http description: MCP adapter for Prisma Optimize API — Queries. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: prisma-ingest-query-execution-data description: Prisma Ingest query execution data hints: readOnly: true destructive: false idempotent: false call: optimize-queries.ingestquerydata with: body: tools.body outputParameters: - type: object mapping: $. - name: prisma-list-queries-session description: Prisma List queries from a session hints: readOnly: true destructive: false idempotent: true call: optimize-queries.listsessionqueries with: orderBy: tools.orderBy order: tools.order outputParameters: - type: object mapping: $. - name: prisma-get-query-details description: Prisma Get query details hints: readOnly: true destructive: false idempotent: true call: optimize-queries.getquerydetails with: queryId: tools.queryId outputParameters: - type: object mapping: $.