Granular Farm Management API — Crops

Granular Farm Management API — Crops. 1 operations. Lead operation: List crop plans. Self-contained Naftiko capability covering one Granular business surface.

Run with Naftiko GranularCrops

What You Can Do

GET
Listcropplans — List crop plans
/v1/crop-plans

MCP Tools

list-crop-plans

List crop plans

read-only idempotent

Capability Spec

farm-management-crops.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Granular Farm Management API — Crops
  description: 'Granular Farm Management API — Crops. 1 operations. Lead operation: List crop plans. Self-contained Naftiko
    capability covering one Granular business surface.'
  tags:
  - Granular
  - Crops
  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-crops
    baseUri: https://api.granular.ag/v1
    description: Granular Farm Management API — Crops business capability. Self-contained, no shared references.
    resources:
    - name: crop-plans
      path: /crop-plans
      operations:
      - name: listcropplans
        method: GET
        description: List crop plans
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: season
          in: query
          type: integer
          description: Crop year
          required: true
        - name: farmId
          in: query
          type: string
    authentication:
      type: bearer
      token: '{{env.GRANULAR_API_KEY}}'
  exposes:
  - type: rest
    namespace: farm-management-crops-rest
    port: 8080
    description: REST adapter for Granular Farm Management API — Crops. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/crop-plans
      name: crop-plans
      description: REST surface for crop-plans.
      operations:
      - method: GET
        name: listcropplans
        description: List crop plans
        call: farm-management-crops.listcropplans
        with:
          season: rest.season
          farmId: rest.farmId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: farm-management-crops-mcp
    port: 9090
    transport: http
    description: MCP adapter for Granular Farm Management API — Crops. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-crop-plans
      description: List crop plans
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: farm-management-crops.listcropplans
      with:
        season: tools.season
        farmId: tools.farmId
      outputParameters:
      - type: object
        mapping: $.