Kubecost · Capability

Kubecost Assets API — Model

Kubecost Assets API — Model. 2 operations. Lead operation: Kubecost Query asset cost data. Self-contained Naftiko capability covering one Kubecost business surface.

Run with Naftiko KubecostModel

What You Can Do

GET
Getassets — Kubecost Query asset cost data
/v1/model/assets
GET
Getassetstotals — Kubecost Query total asset costs
/v1/model/assets/totals

MCP Tools

kubecost-query-asset-cost-data

Kubecost Query asset cost data

read-only idempotent
kubecost-query-total-asset-costs

Kubecost Query total asset costs

read-only idempotent

Capability Spec

assets-model.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Kubecost Assets API — Model
  description: 'Kubecost Assets API — Model. 2 operations. Lead operation: Kubecost Query asset cost data. Self-contained
    Naftiko capability covering one Kubecost business surface.'
  tags:
  - Kubecost
  - Model
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    KUBECOST_API_KEY: KUBECOST_API_KEY
capability:
  consumes:
  - type: http
    namespace: assets-model
    baseUri: http://{kubecost-address}
    description: Kubecost Assets API — Model business capability. Self-contained, no shared references.
    resources:
    - name: model-assets
      path: /model/assets
      operations:
      - name: getassets
        method: GET
        description: Kubecost Query asset cost data
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: window
          in: query
          type: string
          description: Duration of time over which to query. Accepts units of time (e.g. 3d, 24h, 7d), relative time (e.g.
            yesterday, lastweek), or RFC3339 date pairs.
          required: true
        - name: aggregate
          in: query
          type: string
          description: Field by which to aggregate results. Supported values include account, category, cluster, name, project,
            providerid, provider, service, type, department, enviro
        - name: accumulate
          in: query
          type: boolean
          description: If true, sum the entire range into a single set.
        - name: filterClusters
          in: query
          type: string
          description: Filter by cluster name (comma-separated).
        - name: filterTypes
          in: query
          type: string
          description: Filter by asset type (comma-separated). Supported values include Node, Disk, LoadBalancer, ClusterManagement,
            Network, Attached.
        - name: filterAccounts
          in: query
          type: string
          description: Filter by account (comma-separated).
        - name: filterProjects
          in: query
          type: string
          description: Filter by project (comma-separated).
        - name: filterProviders
          in: query
          type: string
          description: Filter by provider (comma-separated).
        - name: filterCategories
          in: query
          type: string
          description: Filter by category (comma-separated).
        - name: filterLabels
          in: query
          type: string
          description: Filter by label in the format label:value.
        - name: filterServices
          in: query
          type: string
          description: Filter by service (comma-separated).
        - name: format
          in: query
          type: string
          description: Output format. Supports csv and json.
    - name: model-assets-totals
      path: /model/assets/totals
      operations:
      - name: getassetstotals
        method: GET
        description: Kubecost Query total asset costs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: window
          in: query
          type: string
          description: Duration of time over which to query.
          required: true
        - name: filterClusters
          in: query
          type: string
        - name: filterTypes
          in: query
          type: string
  exposes:
  - type: rest
    namespace: assets-model-rest
    port: 8080
    description: REST adapter for Kubecost Assets API — Model. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/model/assets
      name: model-assets
      description: REST surface for model-assets.
      operations:
      - method: GET
        name: getassets
        description: Kubecost Query asset cost data
        call: assets-model.getassets
        with:
          window: rest.window
          aggregate: rest.aggregate
          accumulate: rest.accumulate
          filterClusters: rest.filterClusters
          filterTypes: rest.filterTypes
          filterAccounts: rest.filterAccounts
          filterProjects: rest.filterProjects
          filterProviders: rest.filterProviders
          filterCategories: rest.filterCategories
          filterLabels: rest.filterLabels
          filterServices: rest.filterServices
          format: rest.format
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/model/assets/totals
      name: model-assets-totals
      description: REST surface for model-assets-totals.
      operations:
      - method: GET
        name: getassetstotals
        description: Kubecost Query total asset costs
        call: assets-model.getassetstotals
        with:
          window: rest.window
          filterClusters: rest.filterClusters
          filterTypes: rest.filterTypes
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: assets-model-mcp
    port: 9090
    transport: http
    description: MCP adapter for Kubecost Assets API — Model. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: kubecost-query-asset-cost-data
      description: Kubecost Query asset cost data
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: assets-model.getassets
      with:
        window: tools.window
        aggregate: tools.aggregate
        accumulate: tools.accumulate
        filterClusters: tools.filterClusters
        filterTypes: tools.filterTypes
        filterAccounts: tools.filterAccounts
        filterProjects: tools.filterProjects
        filterProviders: tools.filterProviders
        filterCategories: tools.filterCategories
        filterLabels: tools.filterLabels
        filterServices: tools.filterServices
        format: tools.format
      outputParameters:
      - type: object
        mapping: $.
    - name: kubecost-query-total-asset-costs
      description: Kubecost Query total asset costs
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: assets-model.getassetstotals
      with:
        window: tools.window
        filterClusters: tools.filterClusters
        filterTypes: tools.filterTypes
      outputParameters:
      - type: object
        mapping: $.