naftiko: 1.0.0-alpha2 info: label: Grafana — Libraries description: 'Grafana — Libraries. 7 operations. Lead operation: Grafana Get Library Elements. Self-contained Naftiko capability covering one Grafana business surface.' tags: - Grafana - Libraries created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GRAFANA_API_KEY: GRAFANA_API_KEY capability: consumes: - type: http namespace: grafana-libraries baseUri: http://{defaultHost} description: Grafana — Libraries business capability. Self-contained, no shared references. resources: - name: library-elements path: /library-elements operations: - name: getlibraryelements method: GET description: Grafana Get Library Elements outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: searchString in: query type: string description: Part of the name or description searched for. - name: kind in: query type: integer description: Kind of element to search for. - name: sortDirection in: query type: string description: Sort order of elements. - name: typeFilter in: query type: string description: A comma separated list of types to filter the elements by - name: excludeUid in: query type: string description: Element UID to exclude from search results. - name: folderFilter in: query type: string description: A comma separated list of folder ID(s) to filter the elements by. - name: perPage in: query type: integer description: The number of results per page. - name: page in: query type: integer description: The page for a set of records, given that only perPage records are returned at a time. Numbering starts at 1. - name: createlibraryelement method: POST description: Grafana Create Library Element outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: library-elements-name-library_element_name path: /library-elements/name/{library_element_name} operations: - name: getlibraryelementbyname method: GET description: Grafana Get Library Element By Name outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: library_element_name in: path type: string required: true - name: library-elements-library_element_uid path: /library-elements/{library_element_uid} operations: - name: getlibraryelementbyuid method: GET description: Grafana Get Library Element By UID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: library_element_uid in: path type: string required: true - name: deletelibraryelementbyuid method: DELETE description: Grafana Delete Library Element By UID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: library_element_uid in: path type: string required: true - name: updatelibraryelement method: PATCH description: Grafana Update Library Element outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: library_element_uid in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: library-elements-library_element_uid-connections path: /library-elements/{library_element_uid}/connections/ operations: - name: getlibraryelementconnections method: GET description: Grafana Get Library Element Connections outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: library_element_uid in: path type: string required: true authentication: type: apikey key: Authorization value: '{{env.GRAFANA_API_KEY}}' placement: header exposes: - type: rest namespace: grafana-libraries-rest port: 8080 description: REST adapter for Grafana — Libraries. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/library-elements name: library-elements description: REST surface for library-elements. operations: - method: GET name: getlibraryelements description: Grafana Get Library Elements call: grafana-libraries.getlibraryelements with: searchString: rest.searchString kind: rest.kind sortDirection: rest.sortDirection typeFilter: rest.typeFilter excludeUid: rest.excludeUid folderFilter: rest.folderFilter perPage: rest.perPage page: rest.page outputParameters: - type: object mapping: $. - method: POST name: createlibraryelement description: Grafana Create Library Element call: grafana-libraries.createlibraryelement with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/library-elements/name/{library-element-name} name: library-elements-name-library-element-name description: REST surface for library-elements-name-library_element_name. operations: - method: GET name: getlibraryelementbyname description: Grafana Get Library Element By Name call: grafana-libraries.getlibraryelementbyname with: library_element_name: rest.library_element_name outputParameters: - type: object mapping: $. - path: /v1/library-elements/{library-element-uid} name: library-elements-library-element-uid description: REST surface for library-elements-library_element_uid. operations: - method: GET name: getlibraryelementbyuid description: Grafana Get Library Element By UID call: grafana-libraries.getlibraryelementbyuid with: library_element_uid: rest.library_element_uid outputParameters: - type: object mapping: $. - method: DELETE name: deletelibraryelementbyuid description: Grafana Delete Library Element By UID call: grafana-libraries.deletelibraryelementbyuid with: library_element_uid: rest.library_element_uid outputParameters: - type: object mapping: $. - method: PATCH name: updatelibraryelement description: Grafana Update Library Element call: grafana-libraries.updatelibraryelement with: library_element_uid: rest.library_element_uid body: rest.body outputParameters: - type: object mapping: $. - path: /v1/library-elements/{library-element-uid}/connections name: library-elements-library-element-uid-connections description: REST surface for library-elements-library_element_uid-connections. operations: - method: GET name: getlibraryelementconnections description: Grafana Get Library Element Connections call: grafana-libraries.getlibraryelementconnections with: library_element_uid: rest.library_element_uid outputParameters: - type: object mapping: $. - type: mcp namespace: grafana-libraries-mcp port: 9090 transport: http description: MCP adapter for Grafana — Libraries. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: grafana-get-library-elements description: Grafana Get Library Elements hints: readOnly: true destructive: false idempotent: true call: grafana-libraries.getlibraryelements with: searchString: tools.searchString kind: tools.kind sortDirection: tools.sortDirection typeFilter: tools.typeFilter excludeUid: tools.excludeUid folderFilter: tools.folderFilter perPage: tools.perPage page: tools.page outputParameters: - type: object mapping: $. - name: grafana-create-library-element description: Grafana Create Library Element hints: readOnly: false destructive: false idempotent: false call: grafana-libraries.createlibraryelement with: body: tools.body outputParameters: - type: object mapping: $. - name: grafana-get-library-element-name description: Grafana Get Library Element By Name hints: readOnly: true destructive: false idempotent: true call: grafana-libraries.getlibraryelementbyname with: library_element_name: tools.library_element_name outputParameters: - type: object mapping: $. - name: grafana-get-library-element-uid description: Grafana Get Library Element By UID hints: readOnly: true destructive: false idempotent: true call: grafana-libraries.getlibraryelementbyuid with: library_element_uid: tools.library_element_uid outputParameters: - type: object mapping: $. - name: grafana-delete-library-element-uid description: Grafana Delete Library Element By UID hints: readOnly: false destructive: true idempotent: true call: grafana-libraries.deletelibraryelementbyuid with: library_element_uid: tools.library_element_uid outputParameters: - type: object mapping: $. - name: grafana-update-library-element description: Grafana Update Library Element hints: readOnly: false destructive: false idempotent: true call: grafana-libraries.updatelibraryelement with: library_element_uid: tools.library_element_uid body: tools.body outputParameters: - type: object mapping: $. - name: grafana-get-library-element-connections description: Grafana Get Library Element Connections hints: readOnly: true destructive: false idempotent: true call: grafana-libraries.getlibraryelementconnections with: library_element_uid: tools.library_element_uid outputParameters: - type: object mapping: $.