naftiko: 1.0.0-alpha2 info: label: Tyk Gateway API — Policies description: 'Tyk Gateway API — Policies. 5 operations. Lead operation: Tyk List Policies.. Self-contained Naftiko capability covering one Tyk business surface.' tags: - Tyk - Policies created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TYK_API_KEY: TYK_API_KEY capability: consumes: - type: http namespace: gateway-policies baseUri: https://{tenant} description: Tyk Gateway API — Policies business capability. Self-contained, no shared references. resources: - name: tyk-policies path: /tyk/policies operations: - name: listpolicies method: GET description: Tyk List Policies. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: addpolicy method: POST description: Tyk Create a Policy. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: tyk-policies-polID path: /tyk/policies/{polID} operations: - name: deletepolicy method: DELETE description: Tyk Delete a Policy. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: polID in: path type: string description: You can retrieve details of a single policy by ID in your Tyk instance. required: true - name: getpolicy method: GET description: Tyk Get a Policy. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: polID in: path type: string description: You can retrieve details of a single policy by ID in your Tyk instance. required: true - name: updatepolicy method: PUT description: Tyk Update a Policy. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: polID in: path type: string description: You can retrieve details of a single policy by ID in your Tyk instance. required: true - name: body in: body type: object description: Request body (JSON). required: false authentication: type: apikey key: X-Tyk-Authorization value: '{{env.TYK_API_KEY}}' placement: header exposes: - type: rest namespace: gateway-policies-rest port: 8080 description: REST adapter for Tyk Gateway API — Policies. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/tyk/policies name: tyk-policies description: REST surface for tyk-policies. operations: - method: GET name: listpolicies description: Tyk List Policies. call: gateway-policies.listpolicies outputParameters: - type: object mapping: $. - method: POST name: addpolicy description: Tyk Create a Policy. call: gateway-policies.addpolicy with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/tyk/policies/{polid} name: tyk-policies-polid description: REST surface for tyk-policies-polID. operations: - method: DELETE name: deletepolicy description: Tyk Delete a Policy. call: gateway-policies.deletepolicy with: polID: rest.polID outputParameters: - type: object mapping: $. - method: GET name: getpolicy description: Tyk Get a Policy. call: gateway-policies.getpolicy with: polID: rest.polID outputParameters: - type: object mapping: $. - method: PUT name: updatepolicy description: Tyk Update a Policy. call: gateway-policies.updatepolicy with: polID: rest.polID body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: gateway-policies-mcp port: 9090 transport: http description: MCP adapter for Tyk Gateway API — Policies. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: tyk-list-policies description: Tyk List Policies. hints: readOnly: true destructive: false idempotent: true call: gateway-policies.listpolicies outputParameters: - type: object mapping: $. - name: tyk-create-policy description: Tyk Create a Policy. hints: readOnly: false destructive: false idempotent: false call: gateway-policies.addpolicy with: body: tools.body outputParameters: - type: object mapping: $. - name: tyk-delete-policy description: Tyk Delete a Policy. hints: readOnly: false destructive: true idempotent: true call: gateway-policies.deletepolicy with: polID: tools.polID outputParameters: - type: object mapping: $. - name: tyk-get-policy description: Tyk Get a Policy. hints: readOnly: true destructive: false idempotent: true call: gateway-policies.getpolicy with: polID: tools.polID outputParameters: - type: object mapping: $. - name: tyk-update-policy description: Tyk Update a Policy. hints: readOnly: false destructive: false idempotent: true call: gateway-policies.updatepolicy with: polID: tools.polID body: tools.body outputParameters: - type: object mapping: $.