dbt · Capability

dbt Cloud Semantic Layer API — Metrics

dbt Cloud Semantic Layer API — Metrics. 1 operations. Lead operation: Execute a Semantic Layer GraphQL query. Self-contained Naftiko capability covering one Dbt business surface.

Run with Naftiko DbtMetrics

What You Can Do

POST
Executesemanticquery — Execute a Semantic Layer GraphQL query
/v1/api/graphql

MCP Tools

execute-semantic-layer-graphql-query

Execute a Semantic Layer GraphQL query

read-only

Capability Spec

cloud-semantic-layer-metrics.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: dbt Cloud Semantic Layer API — Metrics
  description: 'dbt Cloud Semantic Layer API — Metrics. 1 operations. Lead operation: Execute a Semantic Layer GraphQL query.
    Self-contained Naftiko capability covering one Dbt business surface.'
  tags:
  - Dbt
  - Metrics
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DBT_API_KEY: DBT_API_KEY
capability:
  consumes:
  - type: http
    namespace: cloud-semantic-layer-metrics
    baseUri: https://semantic-layer.cloud.getdbt.com/api/graphql
    description: dbt Cloud Semantic Layer API — Metrics business capability. Self-contained, no shared references.
    resources:
    - name: api-graphql
      path: /api/graphql
      operations:
      - name: executesemanticquery
        method: POST
        description: Execute a Semantic Layer GraphQL query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.DBT_API_KEY}}'
  exposes:
  - type: rest
    namespace: cloud-semantic-layer-metrics-rest
    port: 8080
    description: REST adapter for dbt Cloud Semantic Layer API — Metrics. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/graphql
      name: api-graphql
      description: REST surface for api-graphql.
      operations:
      - method: POST
        name: executesemanticquery
        description: Execute a Semantic Layer GraphQL query
        call: cloud-semantic-layer-metrics.executesemanticquery
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: cloud-semantic-layer-metrics-mcp
    port: 9090
    transport: http
    description: MCP adapter for dbt Cloud Semantic Layer API — Metrics. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: execute-semantic-layer-graphql-query
      description: Execute a Semantic Layer GraphQL query
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: cloud-semantic-layer-metrics.executesemanticquery
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.