Grafana · Capability

Grafana HTTP API — Dashboards

Grafana HTTP API — Dashboards. 4 operations. Lead operation: Create or update a dashboard. Self-contained Naftiko capability covering one Grafana business surface.

Run with Naftiko GrafanaDashboards

What You Can Do

POST
Createupdatedashboard — Create or update a dashboard
/v1/dashboards/db
GET
Getdashboardbyuid — Get dashboard by UID
/v1/dashboards/uid/{uid}
DELETE
Deletedashboardbyuid — Delete dashboard by UID
/v1/dashboards/uid/{uid}
GET
Searchdashboards — Search dashboards and folders
/v1/search

MCP Tools

create-update-dashboard

Create or update a dashboard

get-dashboard-uid

Get dashboard by UID

read-only idempotent
delete-dashboard-uid

Delete dashboard by UID

idempotent
search-dashboards-and-folders

Search dashboards and folders

read-only idempotent

Capability Spec

grafana-dashboards.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Grafana HTTP API — Dashboards
  description: 'Grafana HTTP API — Dashboards. 4 operations. Lead operation: Create or update a dashboard. Self-contained
    Naftiko capability covering one Grafana business surface.'
  tags:
  - Grafana
  - Dashboards
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GRAFANA_API_KEY: GRAFANA_API_KEY
capability:
  consumes:
  - type: http
    namespace: grafana-dashboards
    baseUri: https://{instance}.grafana.net/api
    description: Grafana HTTP API — Dashboards business capability. Self-contained, no shared references.
    resources:
    - name: dashboards-db
      path: /dashboards/db
      operations:
      - name: createupdatedashboard
        method: POST
        description: Create or update a dashboard
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: dashboards-uid-uid
      path: /dashboards/uid/{uid}
      operations:
      - name: getdashboardbyuid
        method: GET
        description: Get dashboard by UID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: uid
          in: path
          type: string
          required: true
      - name: deletedashboardbyuid
        method: DELETE
        description: Delete dashboard by UID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: uid
          in: path
          type: string
          required: true
    - name: search
      path: /search
      operations:
      - name: searchdashboards
        method: GET
        description: Search dashboards and folders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
        - name: tag
          in: query
          type: array
        - name: type
          in: query
          type: string
        - name: folderIds
          in: query
          type: array
        - name: limit
          in: query
          type: integer
        - name: page
          in: query
          type: integer
    authentication:
      type: bearer
      token: '{{env.GRAFANA_API_KEY}}'
  exposes:
  - type: rest
    namespace: grafana-dashboards-rest
    port: 8080
    description: REST adapter for Grafana HTTP API — Dashboards. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/dashboards/db
      name: dashboards-db
      description: REST surface for dashboards-db.
      operations:
      - method: POST
        name: createupdatedashboard
        description: Create or update a dashboard
        call: grafana-dashboards.createupdatedashboard
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/dashboards/uid/{uid}
      name: dashboards-uid-uid
      description: REST surface for dashboards-uid-uid.
      operations:
      - method: GET
        name: getdashboardbyuid
        description: Get dashboard by UID
        call: grafana-dashboards.getdashboardbyuid
        with:
          uid: rest.uid
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletedashboardbyuid
        description: Delete dashboard by UID
        call: grafana-dashboards.deletedashboardbyuid
        with:
          uid: rest.uid
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/search
      name: search
      description: REST surface for search.
      operations:
      - method: GET
        name: searchdashboards
        description: Search dashboards and folders
        call: grafana-dashboards.searchdashboards
        with:
          query: rest.query
          tag: rest.tag
          type: rest.type
          folderIds: rest.folderIds
          limit: rest.limit
          page: rest.page
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: grafana-dashboards-mcp
    port: 9090
    transport: http
    description: MCP adapter for Grafana HTTP API — Dashboards. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: create-update-dashboard
      description: Create or update a dashboard
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: grafana-dashboards.createupdatedashboard
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-dashboard-uid
      description: Get dashboard by UID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: grafana-dashboards.getdashboardbyuid
      with:
        uid: tools.uid
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-dashboard-uid
      description: Delete dashboard by UID
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: grafana-dashboards.deletedashboardbyuid
      with:
        uid: tools.uid
      outputParameters:
      - type: object
        mapping: $.
    - name: search-dashboards-and-folders
      description: Search dashboards and folders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: grafana-dashboards.searchdashboards
      with:
        query: tools.query
        tag: tools.tag
        type: tools.type
        folderIds: tools.folderIds
        limit: tools.limit
        page: tools.page
      outputParameters:
      - type: object
        mapping: $.