naftiko: 1.0.0-alpha2 info: label: Granular Farm Management API — Fields description: 'Granular Farm Management API — Fields. 2 operations. Lead operation: List fields for a farm. Self-contained Naftiko capability covering one Granular business surface.' tags: - Granular - Fields created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GRANULAR_API_KEY: GRANULAR_API_KEY capability: consumes: - type: http namespace: farm-management-fields baseUri: https://api.granular.ag/v1 description: Granular Farm Management API — Fields business capability. Self-contained, no shared references. resources: - name: farms-farmId-fields path: /farms/{farmId}/fields operations: - name: listfields method: GET description: List fields for a farm outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: farmId in: path type: string required: true - name: season in: query type: integer description: Crop year/season to filter fields (e.g., 2024) - name: fields-fieldId path: /fields/{fieldId} operations: - name: getfield method: GET description: Get field details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: fieldId in: path type: string required: true authentication: type: bearer token: '{{env.GRANULAR_API_KEY}}' exposes: - type: rest namespace: farm-management-fields-rest port: 8080 description: REST adapter for Granular Farm Management API — Fields. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/farms/{farmid}/fields name: farms-farmid-fields description: REST surface for farms-farmId-fields. operations: - method: GET name: listfields description: List fields for a farm call: farm-management-fields.listfields with: farmId: rest.farmId season: rest.season outputParameters: - type: object mapping: $. - path: /v1/fields/{fieldid} name: fields-fieldid description: REST surface for fields-fieldId. operations: - method: GET name: getfield description: Get field details call: farm-management-fields.getfield with: fieldId: rest.fieldId outputParameters: - type: object mapping: $. - type: mcp namespace: farm-management-fields-mcp port: 9090 transport: http description: MCP adapter for Granular Farm Management API — Fields. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-fields-farm description: List fields for a farm hints: readOnly: true destructive: false idempotent: true call: farm-management-fields.listfields with: farmId: tools.farmId season: tools.season outputParameters: - type: object mapping: $. - name: get-field-details description: Get field details hints: readOnly: true destructive: false idempotent: true call: farm-management-fields.getfield with: fieldId: tools.fieldId outputParameters: - type: object mapping: $.