← Docs

AI tools

32 tools an AI assistant can use on farm data through the MCP server. Every tool is read-only; none controls devices.

Connect

  1. Add the MCP server to your assistant (ChatGPT, Claude, Copilot, Cursor, Gemini, Grok…): https://mcp.nextfarm.vn/mcp
  2. Sign in with OAuth and pick a farm, or send an API key in the Authorization header.
  3. The assistant only sees tools within the granted scopes. MCP guide →

Maps & seasons · 9

farm_overviewParcel area summary

Parcel area grouped by household, zone or crop: number of households, parcels, total area (ha) and parcels without a boundary. Sorted by area, largest first.

Scope: gis:read

ParameterTypeDescription
crop_type_idstringOnly one crop type
group_bystringGroup by: owner · zone · crop
page_sizeintegerMaximum number of groups
statusstringParcel status
zone_idstringOnly one zone
Example
{
  "group_by": "zone"
}
gis_crop_types_listCrop types

The farm's crop type catalogue: code, name and category. Use the crop type ID to filter parcels, seasons and yields.

Scope: gis:read

ParameterTypeDescription
categorystringCrop category (e.g. rice, fruit trees)
gis_farmers_listHouseholds

Farmer households / members of the sourcing area: name, zone, group and member type. Filter by zone, group or type.

Scope: gis:read

ParameterTypeDescription
groupIdstringOnly one household group
memberTypestringMember type
pageSizeintegerMaximum rows
zoneIdstringOnly one zone
gis_parcels_getParcel detail

One parcel: name, code, area, zone, owner, current crop and status.

Scope: gis:read

ParameterTypeDescription
id *stringParcel ID (UUID)
Example
{
  "id": "0190a3c2-5b1e-7c3d-8e4f-000000000001"
}
gis_parcels_listParcels

The farm's parcels: code, area (ha), zone, owner, current crop and status. Filter by zone, crop or status.

Scope: gis:read

ParameterTypeDescription
crop_type_idstringOnly one crop type
pageintegerPage, from 1
page_sizeintegerRows per page
statusstringParcel status
zone_idstringOnly one zone
Example
{
  "page": 1,
  "page_size": 50
}
gis_seasons_groupsSeason groups of a year

Seasons with the same crop and season name across parcels in one year (e.g. Rice · Winter-Spring): parcel count, total area, earliest/latest planting date.

Scope: gis:read

ParameterTypeDescription
branchIdstringOnly one branch / cooperative
year *integerYear
Example
{
  "year": 2026
}
gis_seasons_listSeasons

Seasons for one parcel (cultivation history) or for a year: crop, season name, planting date, expected harvest date and status. Provide a parcel or a year.

Scope: gis:read

ParameterTypeDescription
parcelIdstringParcel ID
yearintegerYear (e.g. 2026)
Example
{
  "year": 2026
}
gis_zones_statsZone statistics

Number of parcels and total area (ha) of one zone.

Scope: gis:read

ParameterTypeDescription
id *stringZone ID (UUID)

Harvest & traceability · 8

certification_expiringExpiring certificates

Certificates (VietGAP, GlobalGAP, organic…) about to expire or already expired, sorted by expiry date.

Scope: harvest:read

ParameterTypeDescription
include_expiredbooleanInclude already expired certificates
within_daysintegerExpiring within this many days (default 30)
Example
{
  "within_days": 60
}
harvest_phi_activeParcels under pre-harvest interval

Parcels, ponds and pens currently under a pesticide pre-harvest interval or veterinary withdrawal period: earliest safe date and the blocking application.

Scope: harvest:read

ParameterTypeDescription
onstringCheck date (yyyy-MM-dd, default today)
harvest_record_listHarvest records

Declared harvest records: parcel, crop, declared yield (kg), status (draft · confirmed · verified · collected · void), harvest date and traceability lot.

Scope: harvest:read

ParameterTypeDescription
pageintegerPage, from 1
page_sizeintegerRows per page
statusstringFilter by status
Example
{
  "status": "confirmed"
}
harvest_summaryYield summary

Harvested yield (confirmed records only) grouped by household, zone, crop or parcel within a harvest date range. Sorted by total kg, largest first.

Scope: harvest:read

ParameterTypeDescription
crop_type_idstringOnly one crop type
fromstringHarvest date from (yyyy-MM-dd)
group_bystringparcel · crop · zone · owner
tostringHarvest date to (yyyy-MM-dd)
zone_idstringOnly one zone
Example
{
  "from": "2026-10-01",
  "group_by": "crop",
  "to": "2026-10-31"
}
harvest_trace_getTraceability lot detail

One traceability lot: cultivation log, certificates and photos — what a buyer sees when scanning the QR label.

Scope: harvest:read

ParameterTypeDescription
id *stringTraceability lot ID (UUID)
harvest_trace_listTraceability lots

Published traceability lots of the farm: parcel, zone, product, certification, harvest date, farmer and number of stages.

Scope: harvest:read

phi_statusPre-harvest interval of a parcel

Whether a parcel is still within a pesticide pre-harvest interval, the earliest safe harvest date and the application holding it.

Scope: harvest:read

ParameterTypeDescription
onstringCheck date (yyyy-MM-dd, default today)
parcel_id *stringParcel ID (UUID)

IoT (read-only) · 8

iot_alerts_listSensor alerts

Sensor threshold alerts: device, metric, value, threshold, severity and handling status.

Scope: iot:read

ParameterTypeDescription
device_idstringOne device
fromstringFrom
pageintegerPage
page_sizeintegerRows per page
severitystringSeverity
statusstringStatus (e.g. triggered, acknowledged, resolved)
tostringTo
Example
{
  "status": "triggered"
}
iot_command_statusDevice commands

Latest commands sent to one controller: command type, status, sent time and whether the device acknowledged it.

Scope: iot:read

ParameterTypeDescription
device_id *stringController ID (UUID)
limitintegerNumber of commands (max 20)
iot_device_listIoT devices

The farm's IoT devices: name, type, online or offline, last report time. Filter by status, parcel or zone.

Scope: iot:read

ParameterTypeDescription
pageintegerPage, from 1
page_sizeintegerRows per page
parcel_idstringOnly devices of one parcel
statusstringonline · offline · active · inactive · maintenance
zone_idstringOnly devices of one zone
Example
{
  "status": "offline"
}
iot_irrigation_outputsController valves and pumps

Irrigation outputs of one controller: type (pump, zone valve, fertigation), index and the user-given name (e.g. 'Block A').

Scope: iot:read

ParameterTypeDescription
device_id *stringController ID (UUID)
iot_readings_historyReading history

Sensor reading history for a device or zone within a time range, newest first.

Scope: iot:read

ParameterTypeDescription
device_idstringOne device
fromstringFrom (ISO 8601)
pageintegerPage, from 1
page_sizeintegerRows per page (max 500)
tostringTo (ISO 8601)
zone_idstringOne zone
Example
{
  "from": "2026-10-27",
  "to": "2026-10-28"
}
iot_readings_latestLatest readings

The latest value of each sensor (temperature, humidity, EC, pH…) for the whole farm or one zone.

Scope: iot:read

ParameterTypeDescription
zone_idstringOnly sensors of one zone
iot_schedule_upcomingUpcoming irrigation runs

Upcoming scheduled irrigation runs: controller, start time, duration (seconds), valves, skipped or already run.

Scope: iot:read

ParameterTypeDescription
daysintegerNumber of days ahead (1–7)
device_idstringOnly one controller
fromstringFrom date (yyyy-MM-dd, default today)
Example
{
  "days": 2
}

Farm books & tasks · 5

office_automations_listAutomation rules

The farm's automation rules: name, status, trigger type and last run.

Scope: office:read

ParameterTypeDescription
pageintegerPage, from 1
page_sizeintegerRows per page
searchstringKeyword
statusstringStatus
office_books_fieldsTable columns

Columns of one table: name, data type and options — needed to read row values correctly.

Scope: office:read

ParameterTypeDescription
table_id *stringTable ID (UUID)
office_books_listFarm books

The farm's custom books (logs, inventory, costs…): name, description and number of tables.

Scope: office:read

ParameterTypeDescription
pageintegerPage, from 1
page_sizeintegerRows per page
searchstringKeyword
office_books_recordsTable rows

Read rows of a book table, paginated; values keyed by column ID.

Scope: office:read

ParameterTypeDescription
pageintegerPage, from 1
page_sizeintegerRows per page
table_id *stringTable ID (UUID)
office_books_tablesBook tables

Tables inside one farm book.

Scope: office:read

ParameterTypeDescription
app_id *stringBook ID (UUID)

Reports · 2

report_catalogReport catalogue

Available farm reports: code, name, group and the number of data blocks you can see.

Scope: reports:read

report_queryRun a report

Run a report by code over a date range: KPIs, time series, breakdowns and tables. Without dates the last 30 days are used.

Scope: reports:read

ParameterTypeDescription
code *stringReport code (from the report catalogue)
fromstringFrom date (yyyy-MM-dd)
grainstringTime grain: day · week · month · quarter · year
tostringTo date (yyyy-MM-dd)
Example
{
  "code": "SX-01",
  "from": "2026-10-01",
  "grain": "week",
  "to": "2026-10-28"
}
The catalog is generated from the production server on every build — new tools appear automatically.