naftiko: 1.0.0-alpha2 info: label: Grafana HTTP API — Users description: 'Grafana HTTP API — Users. 5 operations. Lead operation: Create a new user (admin). Self-contained Naftiko capability covering one Grafana business surface.' tags: - Grafana - Users created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GRAFANA_API_KEY: GRAFANA_API_KEY capability: consumes: - type: http namespace: grafana-users baseUri: https://{instance}.grafana.net/api description: Grafana HTTP API — Users business capability. Self-contained, no shared references. resources: - name: admin-users path: /admin/users operations: - name: admincreateuser method: POST description: Create a new user (admin) outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: user path: /user operations: - name: getcurrentuser method: GET description: Get current user outputRawFormat: json outputParameters: - name: result type: object value: $. - name: users path: /users operations: - name: searchusers method: GET description: Search users outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: perpage in: query type: integer - name: page in: query type: integer - name: query in: query type: string - name: users-id path: /users/{id} operations: - name: getuserbyid method: GET description: Get user by ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: updateuser method: PUT description: Update user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.GRAFANA_API_KEY}}' exposes: - type: rest namespace: grafana-users-rest port: 8080 description: REST adapter for Grafana HTTP API — Users. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/admin/users name: admin-users description: REST surface for admin-users. operations: - method: POST name: admincreateuser description: Create a new user (admin) call: grafana-users.admincreateuser with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/user name: user description: REST surface for user. operations: - method: GET name: getcurrentuser description: Get current user call: grafana-users.getcurrentuser outputParameters: - type: object mapping: $. - path: /v1/users name: users description: REST surface for users. operations: - method: GET name: searchusers description: Search users call: grafana-users.searchusers with: perpage: rest.perpage page: rest.page query: rest.query outputParameters: - type: object mapping: $. - path: /v1/users/{id} name: users-id description: REST surface for users-id. operations: - method: GET name: getuserbyid description: Get user by ID call: grafana-users.getuserbyid with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: updateuser description: Update user call: grafana-users.updateuser with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: grafana-users-mcp port: 9090 transport: http description: MCP adapter for Grafana HTTP API — Users. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: create-new-user-admin description: Create a new user (admin) hints: readOnly: false destructive: false idempotent: false call: grafana-users.admincreateuser with: body: tools.body outputParameters: - type: object mapping: $. - name: get-current-user description: Get current user hints: readOnly: true destructive: false idempotent: true call: grafana-users.getcurrentuser outputParameters: - type: object mapping: $. - name: search-users description: Search users hints: readOnly: true destructive: false idempotent: true call: grafana-users.searchusers with: perpage: tools.perpage page: tools.page query: tools.query outputParameters: - type: object mapping: $. - name: get-user-id description: Get user by ID hints: readOnly: true destructive: false idempotent: true call: grafana-users.getuserbyid with: id: tools.id outputParameters: - type: object mapping: $. - name: update-user description: Update user hints: readOnly: false destructive: false idempotent: true call: grafana-users.updateuser with: id: tools.id body: tools.body outputParameters: - type: object mapping: $.