Macrostrat · Capability

Macrostrat API — Stats

Macrostrat API — Stats. 1 operations. Lead operation: Get database statistics. Self-contained Naftiko capability covering one Macrostrat business surface.

Run with Naftiko MacrostratStats

What You Can Do

GET
Getstats — Get database statistics
/v1/stats

MCP Tools

get-database-statistics

Get database statistics

read-only idempotent

Capability Spec

macrostrat-stats.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Macrostrat API — Stats
  description: 'Macrostrat API — Stats. 1 operations. Lead operation: Get database statistics. Self-contained Naftiko capability
    covering one Macrostrat business surface.'
  tags:
  - Macrostrat
  - Stats
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MACROSTRAT_API_KEY: MACROSTRAT_API_KEY
capability:
  consumes:
  - type: http
    namespace: macrostrat-stats
    baseUri: https://macrostrat.org/api/v2
    description: Macrostrat API — Stats business capability. Self-contained, no shared references.
    resources:
    - name: stats
      path: /stats
      operations:
      - name: getstats
        method: GET
        description: Get database statistics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: macrostrat-stats-rest
    port: 8080
    description: REST adapter for Macrostrat API — Stats. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/stats
      name: stats
      description: REST surface for stats.
      operations:
      - method: GET
        name: getstats
        description: Get database statistics
        call: macrostrat-stats.getstats
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: macrostrat-stats-mcp
    port: 9090
    transport: http
    description: MCP adapter for Macrostrat API — Stats. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-database-statistics
      description: Get database statistics
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: macrostrat-stats.getstats
      outputParameters:
      - type: object
        mapping: $.