naftiko: 1.0.0-alpha2 info: label: Control API v1 — rules description: 'Control API v1 — rules. 5 operations. Lead operation: Lists rules. Self-contained Naftiko capability covering one Ably business surface.' tags: - Ably - rules created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: ABLY_API_KEY: ABLY_API_KEY capability: consumes: - type: http namespace: control-rules baseUri: https://control.ably.net/v1 description: Control API v1 — rules business capability. Self-contained, no shared references. resources: - name: apps-app_id-rules path: /apps/{app_id}/rules operations: - name: get method: GET description: Lists rules outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: app_id in: path type: string description: The application ID. required: true - name: post method: POST description: Creates a rule outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: app_id in: path type: string description: The application ID. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: apps-app_id-rules-rule_id path: /apps/{app_id}/rules/{rule_id} operations: - name: get method: GET description: Gets a rule using a rule ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: app_id in: path type: string description: The application ID. required: true - name: rule_id in: path type: string description: The rule ID. required: true - name: patch method: PATCH description: Updates a Rule outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: app_id in: path type: string description: The application ID. required: true - name: rule_id in: path type: string description: The rule ID. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: delete method: DELETE description: Deletes a rule outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: app_id in: path type: string description: The application ID. required: true - name: rule_id in: path type: string description: The rule ID. required: true authentication: type: bearer token: '{{env.ABLY_API_KEY}}' exposes: - type: rest namespace: control-rules-rest port: 8080 description: REST adapter for Control API v1 — rules. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/apps/{app-id}/rules name: apps-app-id-rules description: REST surface for apps-app_id-rules. operations: - method: GET name: get description: Lists rules call: control-rules.get with: app_id: rest.app_id outputParameters: - type: object mapping: $. - method: POST name: post description: Creates a rule call: control-rules.post with: app_id: rest.app_id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/apps/{app-id}/rules/{rule-id} name: apps-app-id-rules-rule-id description: REST surface for apps-app_id-rules-rule_id. operations: - method: GET name: get description: Gets a rule using a rule ID call: control-rules.get with: app_id: rest.app_id rule_id: rest.rule_id outputParameters: - type: object mapping: $. - method: PATCH name: patch description: Updates a Rule call: control-rules.patch with: app_id: rest.app_id rule_id: rest.rule_id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: delete description: Deletes a rule call: control-rules.delete with: app_id: rest.app_id rule_id: rest.rule_id outputParameters: - type: object mapping: $. - type: mcp namespace: control-rules-mcp port: 9090 transport: http description: MCP adapter for Control API v1 — rules. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: lists-rules description: Lists rules hints: readOnly: true destructive: false idempotent: true call: control-rules.get with: app_id: tools.app_id outputParameters: - type: object mapping: $. - name: creates-rule description: Creates a rule hints: readOnly: false destructive: false idempotent: false call: control-rules.post with: app_id: tools.app_id body: tools.body outputParameters: - type: object mapping: $. - name: gets-rule-using-rule-id description: Gets a rule using a rule ID hints: readOnly: true destructive: false idempotent: true call: control-rules.get with: app_id: tools.app_id rule_id: tools.rule_id outputParameters: - type: object mapping: $. - name: updates-rule description: Updates a Rule hints: readOnly: false destructive: false idempotent: true call: control-rules.patch with: app_id: tools.app_id rule_id: tools.rule_id body: tools.body outputParameters: - type: object mapping: $. - name: deletes-rule description: Deletes a rule hints: readOnly: false destructive: true idempotent: true call: control-rules.delete with: app_id: tools.app_id rule_id: tools.rule_id outputParameters: - type: object mapping: $.