naftiko: 1.0.0-alpha2 info: label: CWMS Data API — Levels description: 'CWMS Data API — Levels. 2 operations. Lead operation: Get Levels. Self-contained Naftiko capability covering one United States Army Corps Of Engineers business surface.' tags: - United States Army Corps Of Engineers - Levels created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: UNITED_STATES_ARMY_CORPS_OF_ENGINEERS_API_KEY: UNITED_STATES_ARMY_CORPS_OF_ENGINEERS_API_KEY capability: consumes: - type: http namespace: cwms-data-levels baseUri: https://cwms-data.usace.army.mil/cwms-data description: CWMS Data API — Levels business capability. Self-contained, no shared references. resources: - name: levels path: /levels operations: - name: getlevels method: GET description: Get Levels outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: office in: query type: string description: Three-character USACE district office code - name: location-id in: query type: string description: Location identifier (supports wildcards) - name: begin in: query type: string description: Start of effective date range - name: end in: query type: string description: End of effective date range - name: unit in: query type: string description: Measurement unit system (EN or SI) - name: datum in: query type: string description: Vertical datum for elevation values - name: page in: query type: string description: Pagination cursor - name: page-size in: query type: integer description: Number of results per page - name: levels-level-id-timeseries path: /levels/{level-id}/timeseries operations: - name: getleveltimeseries method: GET description: Get Level Time Series outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: level-id in: path type: string description: The location level identifier required: true - name: office in: query type: string description: Three-character USACE district office code - name: begin in: query type: string description: Start of time window in ISO 8601 format - name: end in: query type: string description: End of time window in ISO 8601 format authentication: type: bearer token: '{{env.UNITED_STATES_ARMY_CORPS_OF_ENGINEERS_API_KEY}}' exposes: - type: rest namespace: cwms-data-levels-rest port: 8080 description: REST adapter for CWMS Data API — Levels. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/levels name: levels description: REST surface for levels. operations: - method: GET name: getlevels description: Get Levels call: cwms-data-levels.getlevels with: office: rest.office location-id: rest.location-id begin: rest.begin end: rest.end unit: rest.unit datum: rest.datum page: rest.page page-size: rest.page-size outputParameters: - type: object mapping: $. - path: /v1/levels/{level-id}/timeseries name: levels-level-id-timeseries description: REST surface for levels-level-id-timeseries. operations: - method: GET name: getleveltimeseries description: Get Level Time Series call: cwms-data-levels.getleveltimeseries with: level-id: rest.level-id office: rest.office begin: rest.begin end: rest.end outputParameters: - type: object mapping: $. - type: mcp namespace: cwms-data-levels-mcp port: 9090 transport: http description: MCP adapter for CWMS Data API — Levels. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-levels description: Get Levels hints: readOnly: true destructive: false idempotent: true call: cwms-data-levels.getlevels with: office: tools.office location-id: tools.location-id begin: tools.begin end: tools.end unit: tools.unit datum: tools.datum page: tools.page page-size: tools.page-size outputParameters: - type: object mapping: $. - name: get-level-time-series description: Get Level Time Series hints: readOnly: true destructive: false idempotent: true call: cwms-data-levels.getleveltimeseries with: level-id: tools.level-id office: tools.office begin: tools.begin end: tools.end outputParameters: - type: object mapping: $.