USGS Earthquake Hazards Program API — Counts

USGS Earthquake Hazards Program API — Counts. 1 operations. Lead operation: Count events matching the query. Self-contained Naftiko capability covering one Department Of The Interior business surface.

Run with Naftiko Department Of The InteriorCounts

What You Can Do

GET
Countevents — Count events matching the query
/v1/count

MCP Tools

count-events-matching-query

Count events matching the query

read-only idempotent

Capability Spec

usgs-earthquake-counts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: USGS Earthquake Hazards Program API — Counts
  description: 'USGS Earthquake Hazards Program API — Counts. 1 operations. Lead operation: Count events matching the query.
    Self-contained Naftiko capability covering one Department Of The Interior business surface.'
  tags:
  - Department Of The Interior
  - Counts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DEPARTMENT_OF_THE_INTERIOR_API_KEY: DEPARTMENT_OF_THE_INTERIOR_API_KEY
capability:
  consumes:
  - type: http
    namespace: usgs-earthquake-counts
    baseUri: https://earthquake.usgs.gov/fdsnws/event/1
    description: USGS Earthquake Hazards Program API — Counts business capability. Self-contained, no shared references.
    resources:
    - name: count
      path: /count
      operations:
      - name: countevents
        method: GET
        description: Count events matching the query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: starttime
          in: query
          type: string
        - name: endtime
          in: query
          type: string
        - name: minmagnitude
          in: query
          type: number
  exposes:
  - type: rest
    namespace: usgs-earthquake-counts-rest
    port: 8080
    description: REST adapter for USGS Earthquake Hazards Program API — Counts. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/count
      name: count
      description: REST surface for count.
      operations:
      - method: GET
        name: countevents
        description: Count events matching the query
        call: usgs-earthquake-counts.countevents
        with:
          starttime: rest.starttime
          endtime: rest.endtime
          minmagnitude: rest.minmagnitude
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: usgs-earthquake-counts-mcp
    port: 9090
    transport: http
    description: MCP adapter for USGS Earthquake Hazards Program API — Counts. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: count-events-matching-query
      description: Count events matching the query
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usgs-earthquake-counts.countevents
      with:
        starttime: tools.starttime
        endtime: tools.endtime
        minmagnitude: tools.minmagnitude
      outputParameters:
      - type: object
        mapping: $.