Grafana · Capability

Grafana — Annotations

Grafana — Annotations. 10 operations. Lead operation: Grafana Get Annotations. Self-contained Naftiko capability covering one Grafana business surface.

Run with Naftiko GrafanaAnnotations

What You Can Do

GET
Getannotations — Grafana Get Annotations
/v1/annotations
POST
Postannotation — Grafana Post Annotation
/v1/annotations
POST
Postgraphiteannotation — Grafana Post Graphite Annotation
/v1/annotations/graphite
POST
Massdeleteannotations — Grafana Mass Delete Annotations
/v1/annotations/mass-delete
GET
Getannotationtags — Grafana Get Annotation Tags
/v1/annotations/tags
GET
Getannotationbyid — Grafana Get Annotation By ID
/v1/annotations/{annotation-id}
PUT
Updateannotation — Grafana Update Annotation
/v1/annotations/{annotation-id}
DELETE
Deleteannotationbyid — Grafana Delete Annotation By ID
/v1/annotations/{annotation-id}
PATCH
Patchannotation — Grafana Patch Annotation
/v1/annotations/{annotation-id}
GET
Getpublicannotations — Grafana Get Public Annotations
/v1/public/dashboards/{accesstoken}/annotations

MCP Tools

grafana-get-annotations

Grafana Get Annotations

read-only idempotent
grafana-post-annotation

Grafana Post Annotation

grafana-post-graphite-annotation

Grafana Post Graphite Annotation

grafana-mass-delete-annotations

Grafana Mass Delete Annotations

grafana-get-annotation-tags

Grafana Get Annotation Tags

read-only idempotent
grafana-get-annotation-id

Grafana Get Annotation By ID

read-only idempotent
grafana-update-annotation

Grafana Update Annotation

idempotent
grafana-delete-annotation-id

Grafana Delete Annotation By ID

idempotent
grafana-patch-annotation

Grafana Patch Annotation

idempotent
grafana-get-public-annotations

Grafana Get Public Annotations

read-only idempotent

Capability Spec

grafana-annotations-2.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Grafana — Annotations
  description: 'Grafana — Annotations. 10 operations. Lead operation: Grafana Get Annotations. Self-contained Naftiko capability
    covering one Grafana business surface.'
  tags:
  - Grafana
  - Annotations
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GRAFANA_API_KEY: GRAFANA_API_KEY
capability:
  consumes:
  - type: http
    namespace: grafana-annotations-2
    baseUri: http://{defaultHost}
    description: Grafana — Annotations business capability. Self-contained, no shared references.
    resources:
    - name: annotations
      path: /annotations
      operations:
      - name: getannotations
        method: GET
        description: Grafana Get Annotations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: from
          in: query
          type: integer
          description: Find annotations created after specific epoch datetime in milliseconds.
        - name: to
          in: query
          type: integer
          description: Find annotations created before specific epoch datetime in milliseconds.
        - name: userId
          in: query
          type: integer
          description: Limit response to annotations created by specific user.
        - name: alertId
          in: query
          type: integer
          description: Find annotations for a specified alert rule by its ID.
        - name: alertUID
          in: query
          type: string
          description: Find annotations for a specified alert rule by its UID.
        - name: dashboardId
          in: query
          type: integer
          description: Find annotations that are scoped to a specific dashboard
        - name: dashboardUID
          in: query
          type: string
          description: Find annotations that are scoped to a specific dashboard
        - name: panelId
          in: query
          type: integer
          description: Find annotations that are scoped to a specific panel
        - name: limit
          in: query
          type: integer
          description: Max limit for results returned.
        - name: tags
          in: query
          type: array
          description: Use this to filter organization annotations. Organization annotations are annotations from an annotation
            data source that are not connected specifically to a da
        - name: type
          in: query
          type: string
          description: Return alerts or user created annotations
        - name: matchAny
          in: query
          type: boolean
          description: Match any or all tags
      - name: postannotation
        method: POST
        description: Grafana Post Annotation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: annotations-graphite
      path: /annotations/graphite
      operations:
      - name: postgraphiteannotation
        method: POST
        description: Grafana Post Graphite Annotation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: annotations-mass-delete
      path: /annotations/mass-delete
      operations:
      - name: massdeleteannotations
        method: POST
        description: Grafana Mass Delete Annotations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: annotations-tags
      path: /annotations/tags
      operations:
      - name: getannotationtags
        method: GET
        description: Grafana Get Annotation Tags
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tag
          in: query
          type: string
          description: Tag is a string that you can use to filter tags.
        - name: limit
          in: query
          type: string
          description: Max limit for results returned.
    - name: annotations-annotation_id
      path: /annotations/{annotation_id}
      operations:
      - name: getannotationbyid
        method: GET
        description: Grafana Get Annotation By ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: annotation_id
          in: path
          type: string
          required: true
      - name: updateannotation
        method: PUT
        description: Grafana Update Annotation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: annotation_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteannotationbyid
        method: DELETE
        description: Grafana Delete Annotation By ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: annotation_id
          in: path
          type: string
          required: true
      - name: patchannotation
        method: PATCH
        description: Grafana Patch Annotation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: annotation_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: public-dashboards-accessToken-annotations
      path: /public/dashboards/{accessToken}/annotations
      operations:
      - name: getpublicannotations
        method: GET
        description: Grafana Get Public Annotations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: accessToken
          in: path
          type: string
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.GRAFANA_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: grafana-annotations-2-rest
    port: 8080
    description: REST adapter for Grafana — Annotations. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/annotations
      name: annotations
      description: REST surface for annotations.
      operations:
      - method: GET
        name: getannotations
        description: Grafana Get Annotations
        call: grafana-annotations-2.getannotations
        with:
          from: rest.from
          to: rest.to
          userId: rest.userId
          alertId: rest.alertId
          alertUID: rest.alertUID
          dashboardId: rest.dashboardId
          dashboardUID: rest.dashboardUID
          panelId: rest.panelId
          limit: rest.limit
          tags: rest.tags
          type: rest.type
          matchAny: rest.matchAny
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postannotation
        description: Grafana Post Annotation
        call: grafana-annotations-2.postannotation
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/annotations/graphite
      name: annotations-graphite
      description: REST surface for annotations-graphite.
      operations:
      - method: POST
        name: postgraphiteannotation
        description: Grafana Post Graphite Annotation
        call: grafana-annotations-2.postgraphiteannotation
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/annotations/mass-delete
      name: annotations-mass-delete
      description: REST surface for annotations-mass-delete.
      operations:
      - method: POST
        name: massdeleteannotations
        description: Grafana Mass Delete Annotations
        call: grafana-annotations-2.massdeleteannotations
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/annotations/tags
      name: annotations-tags
      description: REST surface for annotations-tags.
      operations:
      - method: GET
        name: getannotationtags
        description: Grafana Get Annotation Tags
        call: grafana-annotations-2.getannotationtags
        with:
          tag: rest.tag
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/annotations/{annotation-id}
      name: annotations-annotation-id
      description: REST surface for annotations-annotation_id.
      operations:
      - method: GET
        name: getannotationbyid
        description: Grafana Get Annotation By ID
        call: grafana-annotations-2.getannotationbyid
        with:
          annotation_id: rest.annotation_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateannotation
        description: Grafana Update Annotation
        call: grafana-annotations-2.updateannotation
        with:
          annotation_id: rest.annotation_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteannotationbyid
        description: Grafana Delete Annotation By ID
        call: grafana-annotations-2.deleteannotationbyid
        with:
          annotation_id: rest.annotation_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patchannotation
        description: Grafana Patch Annotation
        call: grafana-annotations-2.patchannotation
        with:
          annotation_id: rest.annotation_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/public/dashboards/{accesstoken}/annotations
      name: public-dashboards-accesstoken-annotations
      description: REST surface for public-dashboards-accessToken-annotations.
      operations:
      - method: GET
        name: getpublicannotations
        description: Grafana Get Public Annotations
        call: grafana-annotations-2.getpublicannotations
        with:
          accessToken: rest.accessToken
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: grafana-annotations-2-mcp
    port: 9090
    transport: http
    description: MCP adapter for Grafana — Annotations. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: grafana-get-annotations
      description: Grafana Get Annotations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: grafana-annotations-2.getannotations
      with:
        from: tools.from
        to: tools.to
        userId: tools.userId
        alertId: tools.alertId
        alertUID: tools.alertUID
        dashboardId: tools.dashboardId
        dashboardUID: tools.dashboardUID
        panelId: tools.panelId
        limit: tools.limit
        tags: tools.tags
        type: tools.type
        matchAny: tools.matchAny
      outputParameters:
      - type: object
        mapping: $.
    - name: grafana-post-annotation
      description: Grafana Post Annotation
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: grafana-annotations-2.postannotation
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: grafana-post-graphite-annotation
      description: Grafana Post Graphite Annotation
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: grafana-annotations-2.postgraphiteannotation
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: grafana-mass-delete-annotations
      description: Grafana Mass Delete Annotations
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: grafana-annotations-2.massdeleteannotations
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: grafana-get-annotation-tags
      description: Grafana Get Annotation Tags
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: grafana-annotations-2.getannotationtags
      with:
        tag: tools.tag
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.
    - name: grafana-get-annotation-id
      description: Grafana Get Annotation By ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: grafana-annotations-2.getannotationbyid
      with:
        annotation_id: tools.annotation_id
      outputParameters:
      - type: object
        mapping: $.
    - name: grafana-update-annotation
      description: Grafana Update Annotation
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: grafana-annotations-2.updateannotation
      with:
        annotation_id: tools.annotation_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: grafana-delete-annotation-id
      description: Grafana Delete Annotation By ID
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: grafana-annotations-2.deleteannotationbyid
      with:
        annotation_id: tools.annotation_id
      outputParameters:
      - type: object
        mapping: $.
    - name: grafana-patch-annotation
      description: Grafana Patch Annotation
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: grafana-annotations-2.patchannotation
      with:
        annotation_id: tools.annotation_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: grafana-get-public-annotations
      description: Grafana Get Public Annotations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: grafana-annotations-2.getpublicannotations
      with:
        accessToken: tools.accessToken
      outputParameters:
      - type: object
        mapping: $.