Farmbrite MCP by usefulapi

Read Farmbrite livestock, crops, tasks, inventory and orders; log records and tasks.

我该使用它吗

质量与安全性

A
描述质量
97%
模式完整度
93%
命名质量
78%
投毒风险
100%
权限匹配度
100%
协议合规性
100%

发现(4)

  • LOWTool 'farmbrite_list_livestock_groups' name length outside 3-30 range在 farmbrite_list_livestock_groups 中
  • LOWTool 'farmbrite_list_animal_measurements' name length outside 3-30 range在 farmbrite_list_animal_measurements 中
  • LOWTool 'farmbrite_get_inventory_locations' name length outside 3-30 range在 farmbrite_get_inventory_locations 中
  • LOWTool 'farmbrite_add_animal_measurement' name length outside 3-30 range在 farmbrite_add_animal_measurement 中

基于对工具定义和协议合规性的自动分析。

上下文开销

~14,852token 数(工具定义)
~2.7 KB典型响应大小
对注意力有显著影响(占 128k 上下文窗口的 11.60%)

这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。

安装

一键安装

将以下内容添加到你的 `claude_desktop_config.json` 文件中:

{
  "mcpServers": {
    "farmbrite": {
      "url": "https://farmbrite.usefulapi.io/mcp"
    }
  }
}

远程端点

https://farmbrite.usefulapi.io/mcpstreamable-http

它能做什么

工具清单

工具(44)

🟢 只读🟡 写入🔴 删除⚪ 未知
🟢farmbrite_list_animals(status, type, name, tag_number, filters, ...)

List livestock records (name, type, tag number, gender, breed, status, weight, group, purchase/sale data). Farmbrite returns only active-status animals unless you filter by status (Sold, Deceased, Culled, Butchered, Archived...). GET /animals.

输入模式

{
  "type": "object",
  "properties": {
    "status": {
      "description": "Only animals with this status (the default list is Active-type statuses only).",
      "type": "string",
      "enum": [
        "Active",
        "Butchered",
        "Culled",
        "Deceased",
        "Dry",
        "Lactating",
        "Lost",
        "Off Farm",
        "Quarantined",
        "Reference",
        "Sick",
        "Sold",
        "Weaning",
        "Archived"
      ]
    },
    "type": {
      "description": "Only this animal type, e.g. Cattle, Sheep, Chicken.",
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "name": {
      "description": "Animals whose name contains this text.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "tag_number": {
      "description": "Only the animal with this tag number.",
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_animal(animal_id)

One animal by id, with its current location and custom fields. GET /animals/{animal_id}.

输入模式

{
  "type": "object",
  "properties": {
    "animal_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal id (a Farmbrite id string)."
    }
  },
  "required": [
    "animal_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_livestock_groups(filters, sort_by, sort_dir, page, limit)

List livestock groups (id, name, type). GET /livestock_groups.

输入模式

{
  "type": "object",
  "properties": {
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_livestock_group(group_id)

One livestock group by id with its member count, filters and member animals. GET /livestock_groups/{group_id}.

输入模式

{
  "type": "object",
  "properties": {
    "group_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Livestock group id (a Farmbrite id string)."
    }
  },
  "required": [
    "group_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_animal_measurements(animal_id, sort_by, sort_dir, page, limit)

Weight, height, temperature, condition score and fecal-count records of one animal, newest data included. GET /animals/{animal_id}/measurements.

输入模式

{
  "type": "object",
  "properties": {
    "animal_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal id (a Farmbrite id string)."
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "animal_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_feedings(parent, parent_id, page, limit)

Feeding records (amount, cost, date, feed type, inventory used) of one animal or livestock group. GET /{animals|livestock_groups}/{id}/feedings.

输入模式

{
  "type": "object",
  "properties": {
    "parent": {
      "type": "string",
      "enum": [
        "animals",
        "livestock_groups"
      ],
      "description": "Whose feedings."
    },
    "parent_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal or livestock group id (a Farmbrite id string)."
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "parent",
    "parent_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_grazing_summary(filters, sort_by, sort_dir, page, limit)

Grazing status per field/pasture: animals present, days rested, rest days required, last grazed. GET /grazings.

输入模式

{
  "type": "object",
  "properties": {
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_plants(filters, sort_by, sort_dir, page, limit)

List plant types/varieties (days to maturity, spacing, market price, harvest unit). GET /plants.

输入模式

{
  "type": "object",
  "properties": {
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_crops(plot_id, plant_id, filters, sort_by, sort_dir, ...)

List crop plantings (plant, field/plot, bed, quantity, planting and expected harvest dates, growth stage). GET /crops.

输入模式

{
  "type": "object",
  "properties": {
    "plot_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Only plantings in this field/plot id (a Farmbrite id string)."
    },
    "plant_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Only plantings of this plant type id (a Farmbrite id string)."
    },
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_crop(crop_id)

One crop planting by id. GET /crops/{crop_id}.

输入模式

{
  "type": "object",
  "properties": {
    "crop_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Crop planting id (a Farmbrite id string)."
    }
  },
  "required": [
    "crop_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_plots(filters, sort_by, sort_dir, page, limit)

List fields/grow locations (title, type, size, status, grazing rest days). GET /plots.

输入模式

{
  "type": "object",
  "properties": {
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_plot(plot_id)

One field/grow location by id. GET /plots/{plot_id}.

输入模式

{
  "type": "object",
  "properties": {
    "plot_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Field (plot) id (a Farmbrite id string)."
    }
  },
  "required": [
    "plot_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_harvests(parent, parent_id, page, limit)

Harvest records (quantity, unit, grade, price, date, inventory added) of one animal or crop planting. GET /{animals|crops}/{id}/harvests.

输入模式

{
  "type": "object",
  "properties": {
    "parent": {
      "type": "string",
      "enum": [
        "animals",
        "crops"
      ],
      "description": "Whose harvests."
    },
    "parent_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal or crop planting id (a Farmbrite id string)."
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "parent",
    "parent_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_treatments(parent, parent_id, page, limit)

Treatment records (type, product, amount, cost, date, withdrawal date, technician) of one animal, field or crop planting. GET /{animals|plots|crops}/{id}/treatments.

输入模式

{
  "type": "object",
  "properties": {
    "parent": {
      "type": "string",
      "enum": [
        "animals",
        "plots",
        "crops"
      ],
      "description": "What was treated."
    },
    "parent_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal, field (plot) or crop planting id (a Farmbrite id string)."
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "parent",
    "parent_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_notes(parent, parent_id, page, limit)

Notes (description, category, date, keywords) attached to an animal, field, plant type, crop planting or inventory type. GET /{animals|plots|plants|crops|inventory_types}/{id}/notes.

输入模式

{
  "type": "object",
  "properties": {
    "parent": {
      "type": "string",
      "enum": [
        "animals",
        "plots",
        "plants",
        "crops",
        "inventory_types"
      ],
      "description": "What the notes are attached to."
    },
    "parent_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Id of the animal, field, plant type, crop planting or inventory type (a Farmbrite id string)."
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "parent",
    "parent_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_contacts(email, name, filters, sort_by, sort_dir, ...)

List contacts (customers, suppliers, vendors): name, company, email, phone, type, label. GET /contacts.

输入模式

{
  "type": "object",
  "properties": {
    "email": {
      "description": "Only the contact with this exact email.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "name": {
      "description": "Contacts whose last name contains this text.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_contact(contact_id)

One contact by id, with address. GET /contacts/{contact_id}.

输入模式

{
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Contact id (a Farmbrite id string)."
    }
  },
  "required": [
    "contact_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_tasks(complete, assigned_to_id, filters, sort_by, sort_dir, ...)

List tasks (title, description, status, priority, assignee, due/end time, checklist, linked animal/field/crop). GET /tasks.

输入模式

{
  "type": "object",
  "properties": {
    "complete": {
      "description": "true = only completed tasks, false = only open tasks.",
      "type": "boolean"
    },
    "assigned_to_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Only tasks assigned to this user id (a Farmbrite id string)."
    },
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_task(task_id)

One task by id with its checklist. GET /tasks/{task_id}.

输入模式

{
  "type": "object",
  "properties": {
    "task_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Task id (a Farmbrite id string)."
    }
  },
  "required": [
    "task_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_activities(filters, sort_by, sort_dir, page, limit)

List calendar/schedule activities (title, start and end time, all-day flag, linked animal or field). GET /activities.

输入模式

{
  "type": "object",
  "properties": {
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_inventory_types(filters, sort_by, sort_dir, page, limit)

List inventory item types (feed, supplies, harvested products) with the quantity remaining, unit, value and low-stock alert level. GET /inventory_types.

输入模式

{
  "type": "object",
  "properties": {
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_inventory_type(inventory_type_id)

One inventory item type by id with quantity remaining and projected empty date. GET /inventory_types/{inventory_type_id}.

输入模式

{
  "type": "object",
  "properties": {
    "inventory_type_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Inventory type id (a Farmbrite id string)."
    }
  },
  "required": [
    "inventory_type_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_inventory_locations(inventory_type_id, page, limit)

Where one inventory item is stored: warehouse and bin ids and names, capacity and quantity remaining in each. Use the ids with farmbrite_add_inventory / farmbrite_remove_inventory. GET /inventory_types/{inventory_type_id}/inventory.

输入模式

{
  "type": "object",
  "properties": {
    "inventory_type_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Inventory type id (a Farmbrite id string)."
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "inventory_type_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_warehouses(filters, sort_by, sort_dir, page, limit)

List storage locations (warehouses) for inventory: name, description, internal id. Use the ids when adding or removing inventory. GET /warehouses.

输入模式

{
  "type": "object",
  "properties": {
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_orders(status, payment_status, contact_id, filters, sort_by, ...)

List sales orders (status, payment status, total, dates, contact, delivery type, invoice number). GET /orders.

输入模式

{
  "type": "object",
  "properties": {
    "status": {
      "description": "Only orders with this status.",
      "type": "string",
      "enum": [
        "Approved",
        "Cancelled",
        "Complete",
        "Delivered",
        "Draft",
        "In Progress",
        "On Hold",
        "Ordered",
        "Packing",
        "Pending Approval",
        "Picking",
        "Ready",
        "Shipped"
      ]
    },
    "payment_status": {
      "description": "Only orders with this payment status.",
      "type": "string",
      "enum": [
        "Due",
        "Paid",
        "Cancelled"
      ]
    },
    "contact_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Only orders of this contact id (a Farmbrite id string)."
    },
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_order(order_id)

One order by id with its line items, customer contact, delivery address and totals. GET /orders/{order_id}.

输入模式

{
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Order id (a Farmbrite id string)."
    }
  },
  "required": [
    "order_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_list_transactions(type, filters, sort_by, sort_dir, page, ...)

List income and expense transactions (type, amount, date, vendor, category, linked animal/field/plant, description). GET /transactions.

输入模式

{
  "type": "object",
  "properties": {
    "type": {
      "description": "Only expenses or only income.",
      "type": "string",
      "enum": [
        "Expense",
        "Income"
      ]
    },
    "filters": {
      "description": "Extra filters as {field: value}, using a field name from the records. A plain value means equals; 'op:value' applies an operator, op being one of eq, ne, gt, gte, lt, lte, like, in, nin (e.g. {\"created_at\": \"gte:2026-01-01\"} or {\"name\": \"like:Bessie\"}). Farmbrite silently ignores an unknown field or invalid value, so check the result.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "maxLength": 80,
        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      }
    },
    "sort_by": {
      "description": "Field to sort by, e.g. created_at.",
      "type": "string",
      "maxLength": 60,
      "pattern": "^[a-z_][a-z0-9_]*$"
    },
    "sort_dir": {
      "description": "Sort direction.",
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "page": {
      "description": "Page number, from 1 (default 1). Pass the previous reply's next_page.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "limit": {
      "description": "Results per page, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢farmbrite_get_transaction(transaction_id)

One transaction by id. GET /transactions/{transaction_id}.

输入模式

{
  "type": "object",
  "properties": {
    "transaction_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Transaction id (a Farmbrite id string)."
    }
  },
  "required": [
    "transaction_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_create_contact(first_name, last_name, company, type, email, ...)

WRITE: create a contact (customer, supplier, vendor). Nothing is emailed or sent to the contact. Creating twice makes two contacts. POST /contacts.

输入模式

{
  "type": "object",
  "properties": {
    "first_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "last_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "company": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "type": {
      "description": "Contact type, e.g. Customer or Vendor (as defined in your Farmbrite account).",
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "email": {
      "type": "string",
      "maxLength": 200,
      "format": "email",
      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "phone": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50
    },
    "cell": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50
    },
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "address": {
      "type": "object",
      "properties": {
        "street": {
          "type": "string",
          "maxLength": 200
        },
        "city": {
          "type": "string",
          "maxLength": 100
        },
        "state": {
          "type": "string",
          "maxLength": 100
        },
        "postal": {
          "type": "string",
          "maxLength": 30
        },
        "country": {
          "type": "string",
          "maxLength": 100
        }
      }
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴farmbrite_update_contact(contact_id, first_name, last_name, company, email, ...)

WRITE: change fields of an existing contact (only the fields you pass are sent). Overwrites the previous values. PUT /contacts/{contact_id}.

输入模式

{
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Contact id (a Farmbrite id string)."
    },
    "first_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "last_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "company": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "email": {
      "type": "string",
      "maxLength": 200,
      "format": "email",
      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "phone": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50
    },
    "cell": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    }
  },
  "required": [
    "contact_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_create_task(title, description, end_time, assigned_to_id, priority, ...)

WRITE: create a task, optionally linked to an animal, equipment, plant, location or planting. May notify the assigned Farmbrite user according to your account settings. Creating twice makes two tasks. POST /tasks.

输入模式

{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "description": {
      "description": "Task details.",
      "type": "string",
      "minLength": 1,
      "maxLength": 5000
    },
    "end_time": {
      "description": "Due/end time, 'yyyy-mm-dd hh:mm'.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}$"
    },
    "assigned_to_id": {
      "description": "Farmbrite user id or the user's email address to assign the task to.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "priority": {
      "description": "Priority 1-5.",
      "type": "integer",
      "minimum": 1,
      "maximum": 5
    },
    "hours_spent": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000
    },
    "status": {
      "description": "A task status defined in your account, e.g. 'To Do'.",
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "reference_type": {
      "description": "What the task is about (with reference_id).",
      "type": "string",
      "enum": [
        "animal",
        "equipment",
        "plant",
        "location",
        "planting"
      ]
    },
    "reference_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Id of the animal/equipment/plant/location/planting the task is about (a Farmbrite id string)."
    }
  },
  "required": [
    "title"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴farmbrite_update_task(task_id, title, description, end_time, assigned_to_id, ...)

WRITE: change a task (only the fields you pass are sent); set complete=true to mark it done. Overwrites previous values. PUT /tasks/{task_id}.

输入模式

{
  "type": "object",
  "properties": {
    "task_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Task id (a Farmbrite id string)."
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "description": {
      "description": "Task details.",
      "type": "string",
      "minLength": 1,
      "maxLength": 5000
    },
    "end_time": {
      "description": "Due/end time, 'yyyy-mm-dd hh:mm'.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}$"
    },
    "assigned_to_id": {
      "description": "Farmbrite user id or the user's email address to assign the task to.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "priority": {
      "description": "Priority 1-5.",
      "type": "integer",
      "minimum": 1,
      "maximum": 5
    },
    "hours_spent": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000
    },
    "status": {
      "description": "A task status defined in your account, e.g. 'To Do'.",
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "complete": {
      "description": "true marks the task done.",
      "type": "boolean"
    }
  },
  "required": [
    "task_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_create_transaction(type, amount, date, vendor, category, ...)

WRITE: record an income or expense transaction in the farm's books. Creating twice records it twice. POST /transactions.

输入模式

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "Expense",
        "Income"
      ]
    },
    "amount": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000,
      "description": "Positive amount in the account's currency."
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Transaction date, yyyy-mm-dd."
    },
    "vendor": {
      "description": "Vendor or customer name.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "category": {
      "description": "A custom category or an IRS Schedule F key.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "check_number": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50
    },
    "keywords": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "ref_type": {
      "description": "What it relates to (with ref_id).",
      "type": "string",
      "enum": [
        "animal",
        "equipment",
        "plant",
        "location"
      ]
    },
    "ref_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Id of the related animal/equipment/plant/location (a Farmbrite id string)."
    }
  },
  "required": [
    "type",
    "amount",
    "date"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_create_note(parent, parent_id, description, date, category, ...)

WRITE: add a note to an animal, livestock group, field, plant type, crop planting or inventory item. Notes cannot be removed with this server. POST /{parent}/{id}/notes.

输入模式

{
  "type": "object",
  "properties": {
    "parent": {
      "type": "string",
      "enum": [
        "animals",
        "livestock_groups",
        "plots",
        "plants",
        "crops",
        "inventory_types"
      ],
      "description": "What the note is attached to."
    },
    "parent_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Id of the animal, livestock group, field, plant type, crop planting or inventory type (a Farmbrite id string)."
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 5000,
      "description": "The note text."
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "category": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "keywords": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    }
  },
  "required": [
    "parent",
    "parent_id",
    "description"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_add_inventory(inventory_type_id, warehouse_id, adjustment, bin_id, lot_number, ...)

WRITE: add stock to an inventory item in a storage location (warehouse, optionally a bin). Raises the quantity remaining; not idempotent: repeating adds again. Find ids with farmbrite_list_inventory_types, farmbrite_get_inventory_locations and farmbrite_list_warehouses. PUT /inventory_types/{id}/inventory/add.

输入模式

{
  "type": "object",
  "properties": {
    "inventory_type_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Inventory type id (a Farmbrite id string)."
    },
    "warehouse_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Storage location (warehouse) id (a Farmbrite id string)."
    },
    "adjustment": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000000000,
      "description": "Quantity to add (positive, in the item's unit)."
    },
    "bin_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Bin id inside the warehouse (a Farmbrite id string)."
    },
    "lot_number": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "source": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    }
  },
  "required": [
    "inventory_type_id",
    "warehouse_id",
    "adjustment"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴farmbrite_remove_inventory(inventory_type_id, warehouse_id, adjustment, bin_id, lot_number, ...)

WRITE: take stock out of an inventory item in a storage location (use, loss, sale). Lowers the quantity remaining; not idempotent: repeating removes again. It cannot be undone with this server except by adding stock back. PUT /inventory_types/{id}/inventory/remove.

输入模式

{
  "type": "object",
  "properties": {
    "inventory_type_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Inventory type id (a Farmbrite id string)."
    },
    "warehouse_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Storage location (warehouse) id (a Farmbrite id string)."
    },
    "adjustment": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000000000,
      "description": "Quantity to remove (positive, in the item's unit)."
    },
    "bin_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Bin id inside the warehouse (a Farmbrite id string)."
    },
    "lot_number": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "order_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Order id the stock was used for (a Farmbrite id string)."
    }
  },
  "required": [
    "inventory_type_id",
    "warehouse_id",
    "adjustment"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_create_order(status, payment_status, order_items, contact_id, first_name, ...)

WRITE: create a sales order with line items (status defaults to Draft and payment_status to Due unless you set them; memo is internal, note is customer-facing). Farmbrite may email the customer or generate an invoice depending on the account's settings and the status chosen; the API reference does not say, so use Draft unless the user asks otherwise and only pass email when told to. Orders are entered as back-office orders (is_admin). Creating twice makes two orders. POST /orders.

输入模式

{
  "type": "object",
  "properties": {
    "status": {
      "default": "Draft",
      "type": "string",
      "enum": [
        "Approved",
        "Cancelled",
        "Complete",
        "Delivered",
        "Draft",
        "In Progress",
        "On Hold",
        "Ordered",
        "Packing",
        "Pending Approval",
        "Picking",
        "Ready",
        "Shipped"
      ]
    },
    "payment_status": {
      "default": "Due",
      "type": "string",
      "enum": [
        "Due",
        "Paid",
        "Cancelled"
      ]
    },
    "order_items": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "qty": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 1000000000
          },
          "product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[A-Za-z0-9_.-]+$",
            "description": "Product id (a Farmbrite id string)."
          }
        },
        "required": [
          "description",
          "price",
          "qty"
        ]
      },
      "description": "Line items."
    },
    "contact_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Existing contact id for the customer (a Farmbrite id string)."
    },
    "first_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "last_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "email": {
      "type": "string",
      "maxLength": 200,
      "format": "email",
      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "phone": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50
    },
    "order_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "due_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "payment_method": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "delivery_amount": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "discount_amount": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "tax_rate": {
      "description": "Tax rate in percent.",
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "memo": {
      "description": "Internal memo, not shown to the customer.",
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "note": {
      "description": "A message for the CUSTOMER associated with the order (Farmbrite's customer-facing note). Only set it when the user wants the customer to read it; use memo for internal text.",
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    }
  },
  "required": [
    "order_items"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴farmbrite_update_order(order_id, status, payment_status)

WRITE: change an order's status and/or payment status (for example mark it Paid or Delivered). Farmbrite may send customer notifications on some status changes, depending on the account settings. PUT /orders/{order_id}.

输入模式

{
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Order id (a Farmbrite id string)."
    },
    "status": {
      "type": "string",
      "enum": [
        "Approved",
        "Cancelled",
        "Complete",
        "Delivered",
        "Draft",
        "In Progress",
        "On Hold",
        "Ordered",
        "Packing",
        "Pending Approval",
        "Picking",
        "Ready",
        "Shipped"
      ]
    },
    "payment_status": {
      "type": "string",
      "enum": [
        "Due",
        "Paid",
        "Cancelled"
      ]
    }
  },
  "required": [
    "order_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_create_animal(type, status, name, tag_number, electronic_id, ...)

WRITE: add an animal (or a group when is_group=true with group_qty) to the herd. type (e.g. Cattle, Sheep) and status are required. Creating twice makes two animals. POST /animals.

输入模式

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60,
      "description": "Animal type, e.g. Cattle, Sheep, Goat, Chicken or a custom type."
    },
    "status": {
      "default": "Active",
      "type": "string",
      "enum": [
        "Active",
        "Butchered",
        "Culled",
        "Deceased",
        "Dry",
        "Lactating",
        "Lost",
        "Off Farm",
        "Quarantined",
        "Reference",
        "Sick",
        "Sold",
        "Weaning",
        "Archived"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "tag_number": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "electronic_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "internal_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "gender": {
      "description": "e.g. Female, Male.",
      "type": "string",
      "minLength": 1,
      "maxLength": 30
    },
    "breed": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "birth_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "weight": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000000
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "keywords": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "mother_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Mother animal id (a Farmbrite id string)."
    },
    "father_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Father animal id (a Farmbrite id string)."
    },
    "market_price": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "death_date": {
      "description": "Required when status is Butchered, Culled or Deceased.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "deceased_reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "sale_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "is_group": {
      "description": "true to add a group of identical animals.",
      "type": "boolean"
    },
    "group_qty": {
      "description": "Head count when is_group is true.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 1000000
    },
    "purchased": {
      "type": "boolean"
    },
    "purchase_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "purchase_price": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    }
  },
  "required": [
    "type"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴farmbrite_update_animal(animal_id, type, status, name, tag_number, ...)

WRITE: change an animal's fields (only the fields you pass are sent), including its status (Sold, Deceased, Culled...). Statuses Butchered, Culled and Deceased need death_date. Overwrites previous values. PUT /animals/{animal_id}.

输入模式

{
  "type": "object",
  "properties": {
    "animal_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal id (a Farmbrite id string)."
    },
    "type": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "status": {
      "type": "string",
      "enum": [
        "Active",
        "Butchered",
        "Culled",
        "Deceased",
        "Dry",
        "Lactating",
        "Lost",
        "Off Farm",
        "Quarantined",
        "Reference",
        "Sick",
        "Sold",
        "Weaning",
        "Archived"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "tag_number": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "electronic_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "internal_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "gender": {
      "description": "e.g. Female, Male.",
      "type": "string",
      "minLength": 1,
      "maxLength": 30
    },
    "breed": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "birth_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "weight": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000000
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "keywords": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "mother_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Mother animal id (a Farmbrite id string)."
    },
    "father_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Father animal id (a Farmbrite id string)."
    },
    "market_price": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "death_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "deceased_reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "sale_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    }
  },
  "required": [
    "animal_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_add_animal_measurement(animal_id, date, weight, height, temp, ...)

WRITE: record a measurement for one animal (weight, height, temperature, condition score, fecal egg count). Adds a record each time. POST /animals/{animal_id}/measurements.

输入模式

{
  "type": "object",
  "properties": {
    "animal_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal id (a Farmbrite id string)."
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "weight": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000000
    },
    "height": {
      "type": "number",
      "minimum": 0,
      "maximum": 100000
    },
    "temp": {
      "description": "Body temperature.",
      "type": "number",
      "minimum": 0,
      "maximum": 200
    },
    "condition_score": {
      "type": "number",
      "minimum": 0,
      "maximum": 10
    },
    "fec": {
      "description": "Fecal egg count.",
      "type": "number",
      "minimum": 0,
      "maximum": 10000000
    }
  },
  "required": [
    "animal_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴farmbrite_create_feeding(parent, parent_id, amount, unit, type, ...)

WRITE: record a feeding for an animal or livestock group. Either name the feed type, or give inventory_id + inventory_location_id to draw it from inventory (which lowers that inventory's quantity). Adds a record each time. POST /{animals|livestock_groups}/{id}/feedings.

输入模式

{
  "type": "object",
  "properties": {
    "parent": {
      "type": "string",
      "enum": [
        "animals",
        "livestock_groups"
      ]
    },
    "parent_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal or livestock group id (a Farmbrite id string)."
    },
    "amount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000000,
      "description": "Amount fed."
    },
    "unit": {
      "type": "string",
      "minLength": 1,
      "maxLength": 30
    },
    "type": {
      "description": "Feed type, when not drawing from inventory.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "inventory_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Inventory type id the feed comes from (a Farmbrite id string)."
    },
    "inventory_location_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Inventory location id (from farmbrite_get_inventory_locations) (a Farmbrite id string)."
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "cost": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "per_head": {
      "description": "true if amount is per animal.",
      "type": "boolean"
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    }
  },
  "required": [
    "parent",
    "parent_id",
    "amount"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_create_harvest(parent, parent_id, qty, unit, date, ...)

WRITE: record a harvest (quantity and unit) for an animal or crop planting. Adds a record each time. POST /{animals|crops}/{id}/harvests.

输入模式

{
  "type": "object",
  "properties": {
    "parent": {
      "type": "string",
      "enum": [
        "animals",
        "crops"
      ]
    },
    "parent_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal or crop planting id (a Farmbrite id string)."
    },
    "qty": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000000000
    },
    "unit": {
      "type": "string",
      "minLength": 1,
      "maxLength": 30,
      "description": "Unit, e.g. pounds, lbs, dozen."
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "grade": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50
    },
    "price": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "batch_number": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    }
  },
  "required": [
    "parent",
    "parent_id",
    "qty",
    "unit"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡farmbrite_create_treatment(parent, parent_id, type, date, product, ...)

WRITE: record a treatment (vaccine, dewormer, spray, fertilizer...) for an animal, livestock group, field or crop planting. Adds a record each time. POST /{animals|livestock_groups|plots|crops}/{id}/treatments.

输入模式

{
  "type": "object",
  "properties": {
    "parent": {
      "type": "string",
      "enum": [
        "animals",
        "livestock_groups",
        "plots",
        "crops"
      ]
    },
    "parent_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9_.-]+$",
      "description": "Animal, livestock group, field (plot) or crop planting id (a Farmbrite id string)."
    },
    "type": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Treatment type."
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "product": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "amount": {
      "description": "Amount given (a number, or text with its unit such as '5 ml').",
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000
        },
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        }
      ]
    },
    "cost": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "withdrawal_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "retreat_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "technician": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    }
  },
  "required": [
    "parent",
    "parent_id",
    "type"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

社区

评价此服务器

证据

最近观测

已验证未记录版本44 个工具