naftiko: 1.0.0-alpha2 info: label: Portkey API — Guardrails description: 'Portkey API — Guardrails. 5 operations. Lead operation: Create a new guardrail. Self-contained Naftiko capability covering one Portkey business surface.' tags: - Portkey - Guardrails created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PORTKEY_API_KEY: PORTKEY_API_KEY capability: consumes: - type: http namespace: portkey-guardrails baseUri: https://api.portkey.ai/v1 description: Portkey API — Guardrails business capability. Self-contained, no shared references. resources: - name: guardrails path: /guardrails operations: - name: createguardrail method: POST description: Create a new guardrail outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: listguardrails method: GET description: List guardrails outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace_id in: query type: string description: Workspace UUID to filter guardrails - name: organisation_id in: query type: string description: Organisation UUID to filter guardrails - name: page_size in: query type: integer description: Number of items per page - name: current_page in: query type: integer description: Current page number (0-indexed) - name: guardrails-guardrailId path: /guardrails/{guardrailId} operations: - name: getguardrail method: GET description: Get a specific guardrail outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: guardrailId in: path type: string description: Guardrail UUID or slug (with guard_ prefix) required: true - name: updateguardrail method: PUT description: Update a guardrail outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: guardrailId in: path type: string description: Guardrail UUID or slug to update required: true - name: body in: body type: object description: Request body (JSON). required: true - name: deleteguardrail method: DELETE description: Delete a guardrail outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: guardrailId in: path type: string description: Guardrail UUID or slug to delete required: true authentication: type: bearer token: '{{env.PORTKEY_API_KEY}}' exposes: - type: rest namespace: portkey-guardrails-rest port: 8080 description: REST adapter for Portkey API — Guardrails. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/guardrails name: guardrails description: REST surface for guardrails. operations: - method: POST name: createguardrail description: Create a new guardrail call: portkey-guardrails.createguardrail with: body: rest.body outputParameters: - type: object mapping: $. - method: GET name: listguardrails description: List guardrails call: portkey-guardrails.listguardrails with: workspace_id: rest.workspace_id organisation_id: rest.organisation_id page_size: rest.page_size current_page: rest.current_page outputParameters: - type: object mapping: $. - path: /v1/guardrails/{guardrailid} name: guardrails-guardrailid description: REST surface for guardrails-guardrailId. operations: - method: GET name: getguardrail description: Get a specific guardrail call: portkey-guardrails.getguardrail with: guardrailId: rest.guardrailId outputParameters: - type: object mapping: $. - method: PUT name: updateguardrail description: Update a guardrail call: portkey-guardrails.updateguardrail with: guardrailId: rest.guardrailId body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deleteguardrail description: Delete a guardrail call: portkey-guardrails.deleteguardrail with: guardrailId: rest.guardrailId outputParameters: - type: object mapping: $. - type: mcp namespace: portkey-guardrails-mcp port: 9090 transport: http description: MCP adapter for Portkey API — Guardrails. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: create-new-guardrail description: Create a new guardrail hints: readOnly: false destructive: false idempotent: false call: portkey-guardrails.createguardrail with: body: tools.body outputParameters: - type: object mapping: $. - name: list-guardrails description: List guardrails hints: readOnly: true destructive: false idempotent: true call: portkey-guardrails.listguardrails with: workspace_id: tools.workspace_id organisation_id: tools.organisation_id page_size: tools.page_size current_page: tools.current_page outputParameters: - type: object mapping: $. - name: get-specific-guardrail description: Get a specific guardrail hints: readOnly: true destructive: false idempotent: true call: portkey-guardrails.getguardrail with: guardrailId: tools.guardrailId outputParameters: - type: object mapping: $. - name: update-guardrail description: Update a guardrail hints: readOnly: false destructive: false idempotent: true call: portkey-guardrails.updateguardrail with: guardrailId: tools.guardrailId body: tools.body outputParameters: - type: object mapping: $. - name: delete-guardrail description: Delete a guardrail hints: readOnly: false destructive: true idempotent: true call: portkey-guardrails.deleteguardrail with: guardrailId: tools.guardrailId outputParameters: - type: object mapping: $.