vintrace MCP by usefulapi
Read vintrace vessels, batches, work orders, lab results, stock; assign work orders, add notes.
我該用這個嗎
品質與安全性
發現項目(5)
- LOW在 vintrace_get_vessel_details_report 中
- LOW在 vintrace_list_barrel_treatments 中
- LOW在 vintrace_list_block_assessments 中
- LOW在 vintrace_list_cost_transactions 中
- LOW在 vintrace_list_brand_allocations 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"vintrace": {
"url": "https://vintrace.usefulapi.io/mcp"
}
}
}遠端端點
https://vintrace.usefulapi.io/mcpstreamable-http它能做什麼
工具清單
工具(34)
🟢vintrace_list_work_orders(scheduled_since, scheduled_before, status, operation_types, limit, ...)
List winery work orders (cellar jobs such as transfers, additions, bottling) with their jobs, assignee, status and scheduled time. Filter by scheduled time range, status and operation type. Reply: results plus next_offset. GET /v7/operation/work-orders.
輸入結構描述
{
"type": "object",
"properties": {
"scheduled_since": {
"description": "Only work orders scheduled at or after this time (inclusive).",
"type": "string"
},
"scheduled_before": {
"description": "Only work orders scheduled at or before this time (inclusive).",
"type": "string"
},
"status": {
"description": "Work order status, or several separated by commas (for example READY,IN_PROGRESS).",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"operation_types": {
"description": "Winery job type, or several separated by commas (for example TIRAGE,TRANSFER).",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_wine_batches(id, include, limit, offset)
List wine batches (the named lots of wine) with volume, variety, vintage and owner. Use include=vessels,allocations to add where each batch sits. Reply: results plus next_offset. GET /v7/operation/wine-batches.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"description": "Comma-separated vintrace batch ids to fetch.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"include": {
"description": "Extra parts to include, comma-separated: vessels, allocations.",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_get_vessel_details_report(as_at, winery_id, winery_name, business_unit, batch, ...)
The bulk wine report: every vessel (tank, barrel, bin, press, tanker) with its contents, volume, batch, owner and winery as at a date. Use extra_fields=composition,allocations,liveMetrics to add them. Covers every winery the token's user may access unless wineryId/wineryName narrows it. GET /v7/report/vessel-details-report.
輸入結構描述
{
"type": "object",
"properties": {
"as_at": {
"description": "Run the report as at this time (default now).",
"type": "string"
},
"winery_id": {
"description": "Only this winery.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"winery_name": {
"description": "Only the winery with this exact name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_unit": {
"description": "Only this winery business unit.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"batch": {
"description": "Only vessels holding this wine batch.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vessel": {
"description": "Only this vessel (by name/code).",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vessel_id": {
"description": "Only this vessel id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"product_id": {
"description": "Only this wine/product id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"owner": {
"description": "Only this owner.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vessel_type": {
"description": "Vessel types, comma-separated: TANK, BIN, BARREL, BARREL_GROUP, BIN_GROUP, PRESS, TANKER.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"extra_fields": {
"description": "Extra fields, comma-separated: composition, allocations, liveMetrics.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_get_vessel(vessel_type, vessel_id)
One vessel by id: a tank, barrel, barrel group, tanker or bin, with its details, dimensions and contents. GET /v7/vessel/<tanks|barrels|barrel-groups|tankers|bins>/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"vessel_type": {
"type": "string",
"enum": [
"tank",
"barrel",
"barrel_group",
"tanker",
"bin"
],
"description": "What kind of vessel."
},
"vessel_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "vintrace vessel id."
}
},
"required": [
"vessel_type",
"vessel_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_lab_requests(status, lab_name, analysis_template_name, vessel_name, batch, ...)
The lab console: analysis tasks (samples to measure) with lab, template, vessel, batch, status and arrival. Completed tasks are left out unless status includes Completed. Reply: results plus next_offset. GET /v7/lab/lab-requests.
輸入結構描述
{
"type": "object",
"properties": {
"status": {
"description": "Task statuses (for example Completed to include finished tasks). Several values match any of them.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"lab_name": {
"description": "Only tasks assigned to labs with these names. Several values match any of them.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"analysis_template_name": {
"description": "Only tasks using these analysis templates. Several values match any of them.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"vessel_name": {
"description": "Only tasks sampled from vessels with these names. Several values match any of them.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"batch": {
"description": "Only tasks sampled from batches with these names. Several values match any of them.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"work_order_number": {
"description": "Only tasks requested by these work orders (TWL123 or 123). Several values match any of them.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"arrival_status": {
"description": "Only samples with this arrival status.",
"type": "string",
"enum": [
"Arrived",
"Not Arrived"
]
},
"date_after": {
"description": "Only tasks requested at or after this time.",
"type": "string"
},
"date_before": {
"description": "Only tasks requested at or before this time.",
"type": "string"
},
"modified_since": {
"description": "Only tasks modified at or after this time.",
"type": "string"
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_trial_blends(status, composition_summary_by, modified_since, modified_before, limit, ...)
List trial blends (planned blend trials) with status and composition. Use composition_summary_by=variety,vintage to summarise. Reply: results plus next_offset. GET /v7/operation/trial-blends.
輸入結構描述
{
"type": "object",
"properties": {
"status": {
"description": "Trial blend status, or several separated by commas.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"composition_summary_by": {
"description": "Summarise composition by: variety, vintage, region, subRegion (comma-separated).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"modified_since": {
"description": "Only records modified after this time.",
"type": "string"
},
"modified_before": {
"description": "Only records modified before this time.",
"type": "string"
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_search_transactions(date_from, date_to, owner_name, batch_name, winery_name)
Winemaking operations completed in a date range (transfers, additions, blends, racking...) with the from/to vessels and before/after volumes. Defaults to today when no dates are given. GET /v6/transaction/search.
輸入結構描述
{
"type": "object",
"properties": {
"date_from": {
"description": "Operations completed on or after this date.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"date_to": {
"description": "Operations completed on or before this date.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"owner_name": {
"description": "Owner name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"batch_name": {
"description": "Batch name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"winery_name": {
"description": "Winery name.",
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_barrel_treatments(treatment, modified_since, modified_before, limit, offset)
Barrel move shipments / barrel treatments recorded in vintrace, with barrel states and treatment types. Reply: results plus next_offset. GET /v7/operation/barrel-treatments.
輸入結構描述
{
"type": "object",
"properties": {
"treatment": {
"description": "Only this treatment.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"modified_since": {
"description": "Only records modified after this time.",
"type": "string"
},
"modified_before": {
"description": "Only records modified before this time.",
"type": "string"
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_blocks(id, vintage, include, limit, offset)
List vineyard blocks (grower, vineyard, region, variety). To see fruit placements for a vintage pass include=fruitPlacements together with vintage. Reply: results plus next_offset. GET /v7/harvest/blocks.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"description": "Comma-separated block ids.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"vintage": {
"description": "Vintage year (needed with include).",
"type": "string",
"minLength": 1,
"maxLength": 10
},
"include": {
"description": "Extra parts to include, for example fruitPlacements (with vintage).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_block_assessments(assessed_by, created_since, created_before, extra_fields, limit, ...)
List vineyard block assessments (vine and fruit assessments by the viticulture team). Reply: results plus next_offset. GET /v7/harvest/assessments.
輸入結構描述
{
"type": "object",
"properties": {
"assessed_by": {
"description": "Filter by assessor: a vintrace user id (123), or ext:<external id>. Prefix ne: to exclude that user (ne:123); the default is an exact match (eq:).",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"created_since": {
"description": "Only assessments created after this time.",
"type": "string"
},
"created_before": {
"description": "Only assessments created before this time.",
"type": "string"
},
"extra_fields": {
"description": "Extra fields to include, comma-separated (see the BlockAssessment fields).",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_bookings(vintage, winery_ids, arrival_after, arrival_before, grower_name, ...)
List active fruit bookings (grape deliveries planned for a vintage) for one or more wineries: grower, block, variety, expected pick time and quantity. vintage and winery_ids are required. Reply: results plus next_offset. GET /v7/operation/bookings.
輸入結構描述
{
"type": "object",
"properties": {
"vintage": {
"type": "integer",
"minimum": 1900,
"maximum": 2200,
"description": "Vintage year, e.g. 2026."
},
"winery_ids": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"description": "vintrace winery ids (see vintrace_get_vessel_details_report for winery names/ids)."
},
"arrival_after": {
"description": "Arrival after this time.",
"type": "string"
},
"arrival_before": {
"description": "Arrival before this time.",
"type": "string"
},
"grower_name": {
"description": "Only this grower.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vineyard_name": {
"description": "Only this vineyard.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"block_name": {
"description": "Only this block.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"booking_number": {
"description": "A vintrace booking number.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"modified_since": {
"description": "Added, changed or deactivated since this time.",
"type": "string"
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"required": [
"vintage",
"winery_ids"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_bulk_intakes(purchase_reference, modified_since, modified_before, limit, offset)
List bulk wine/juice intakes (wine bought or received in bulk) with batch, volume, owner and cost. Reply: results plus next_offset. GET /v7/operation/bulk-intakes.
輸入結構描述
{
"type": "object",
"properties": {
"purchase_reference": {
"description": "Exact purchase reference (sent to vintrace as eq:<reference>).",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"modified_since": {
"description": "Only records modified after this time.",
"type": "string"
},
"modified_before": {
"description": "Only records modified before this time.",
"type": "string"
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_search_fruit_intakes(vintage, grower_name, vineyard_name, block_name, owner_name, ...)
Fruit intake operations (grape deliveries weighed in at the winery): weights, grower, block, vineyard, vintage, docket numbers and metrics. Filter by vintage, grower, vineyard, block or recorded time. Page with first_result and max_results. GET /v6/intake-operations/search.
輸入結構描述
{
"type": "object",
"properties": {
"vintage": {
"description": "Vintage year.",
"type": "string",
"minLength": 1,
"maxLength": 10
},
"grower_name": {
"description": "Grower name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vineyard_name": {
"description": "Vineyard name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"block_name": {
"description": "Block name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"owner_name": {
"description": "Fruit owner name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"winery_name": {
"description": "Winery name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"delivery_docket": {
"description": "Delivery docket number.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"intake_docket": {
"description": "Intake docket number.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"recorded_after": {
"description": "Recorded at or after this time.",
"type": "string"
},
"recorded_before": {
"description": "Recorded at or before this time.",
"type": "string"
},
"modified_since": {
"description": "Modified since this time.",
"type": "string"
},
"max_results": {
"description": "Results per page, 1-200.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"first_result": {
"description": "Start index of the page (default 0; vintrace \"first\").",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_stock_dispatches(limit, offset)
List stock dispatch actions (bottled goods and dry goods sent out) with routes, items and shipping information. Reply: results plus next_offset. GET /v7/stock/dispatches.
輸入結構描述
{
"type": "object",
"properties": {
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_shipments(type, dispatch_type, freight_code, include, modified_since, ...)
List shipments created by Bulk Dispatch and inter-winery dispatch operations, with destination and wine details. Reply: results plus next_offset. GET /v7/operation/shipments.
輸入結構描述
{
"type": "object",
"properties": {
"type": {
"description": "Operation type.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"dispatch_type": {
"description": "Dispatch type name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"freight_code": {
"description": "Freight code name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"include": {
"description": "Extra wine details to include: allocations, metrics, composition, cost (comma-separated).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"modified_since": {
"description": "Only records modified after this time.",
"type": "string"
},
"modified_before": {
"description": "Only records modified before this time.",
"type": "string"
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_cost_transactions(start, end, winery_id, winery_name, business_unit, ...)
Bulk wine cost movements between two times (cost of wine moved between batches and wineries), optionally for one winery or business unit. Needs the vintrace permission to view costs. Reply: results plus next_offset. GET /v7/costs/business-unit-transactions.
輸入結構描述
{
"type": "object",
"properties": {
"start": {
"type": "string",
"description": "Start of the period (required)."
},
"end": {
"type": "string",
"description": "End of the period (required)."
},
"winery_id": {
"description": "Only this winery.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"winery_name": {
"description": "Only the winery with this exact name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"business_unit": {
"description": "Only this business unit.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"required": [
"start",
"end"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_brand_allocations(status, vintage, modified_since, limit, offset)
List brand allocations of bulk wine (how much of a wine is promised to which brand), by status and vintage. Reply: results plus next_offset. GET /v7/allocations/brand-allocations.
輸入結構描述
{
"type": "object",
"properties": {
"status": {
"description": "Allocation status.",
"type": "string",
"enum": [
"INCOMPLETE",
"COMPLETE",
"ARCHIVED"
]
},
"vintage": {
"description": "Vintage year.",
"type": "integer",
"minimum": 1900,
"maximum": 2200
},
"modified_since": {
"description": "Only records modified after this time.",
"type": "string"
},
"limit": {
"description": "Results per page, 1-200 (vintrace default 10).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"offset": {
"description": "Index of the first result (default 0). Pass the previous reply's offset + limit.",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_get_purchase_order(purchase_order_id)
One purchase order with its lines, state and fulfilment. GET /v7/account/purchase-orders/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"purchase_order_id": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "vintrace purchase order id."
}
},
"required": [
"purchase_order_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_inventory(date, stock_type, owner_name, breakout_costing, max, ...)
Stock on hand (bottled wine, dry goods, additives) up to a date: quantity, committed, on order and available per item, location, owner, tax class. breakout_costing needs the view-costs permission. GET /v6/inventory.
輸入結構描述
{
"type": "object",
"properties": {
"date": {
"description": "Report stock up to this date, excluding later changes.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"stock_type": {
"description": "Stock type, for example Wine batch, Additive, Closure, Glass/Container, Case x12.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"owner_name": {
"description": "Only this owner's stock.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"breakout_costing": {
"description": "Break out each item's costs by category (needs the permission).",
"type": "boolean"
},
"max": {
"description": "Results per page, 1-200 (sent as vintrace's \"max\").",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"first": {
"description": "Start index of the page (default 0; vintrace \"first\").",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_lookup_stock_item(code, id)
Find one stock item by code (matched against the start of the code) or by id: type, unit, owner, accounts, tax class and sub-components. Give code or id. GET /v6/stock/lookup.
輸入結構描述
{
"type": "object",
"properties": {
"code": {
"description": "Stock item code (start of code).",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"id": {
"description": "Stock item id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_get_stock_item(stock_item_id, expand)
One stock item by id with optional detail parts: expand=fields,distributions,notes,historyItems,rawComponents,bulkInfo. GET /v6/mrp/stock/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"stock_item_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "vintrace stock item id (from vintrace_lookup_stock_item or vintrace_list_inventory)."
},
"expand": {
"description": "Comma-separated parts to expand: fields, distributions, notes, historyItems, rawComponents, bulkInfo.",
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"stock_item_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_stock_item_notes(stock_item_id, first_result, max_result)
The notes recorded on a stock item. GET /v6/mrp/stock/{id}/notes.
輸入結構描述
{
"type": "object",
"properties": {
"stock_item_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "vintrace stock item id."
},
"first_result": {
"description": "Start index of the page (default 0; vintrace \"first\").",
"type": "integer",
"minimum": 0,
"maximum": 10000000
},
"max_result": {
"description": "Notes per page, 1-200.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
}
},
"required": [
"stock_item_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_products(barcode, skip_metrics, max, first)
List wine products as they sit in vessels: batch code, vessel, volume, colour, state and the latest lab metrics (TSO2, pH, Brix...). skip_metrics=true makes it faster. barcode matches a vessel code or asset id. GET /v6/products/list.
輸入結構描述
{
"type": "object",
"properties": {
"barcode": {
"description": "A vessel code or asset id.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"skip_metrics": {
"description": "Leave out the metric measurements.",
"type": "boolean"
},
"max": {
"description": "Results per page, 1-200 (sent as vintrace's \"max\").",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"first": {
"description": "Start index of the page (default 0; vintrace \"first\").",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_get_product(product_id, barcode)
One wine product by id (or by vessel barcode) with its vessel, volume and metrics. GET /v6/products/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"product_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "vintrace product id."
},
"barcode": {
"description": "A vessel code or asset id.",
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"product_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_sales_orders(status, customer_name, starts_with, start_date, end_date, ...)
List sales orders with customer, status, price list, line items, totals and invoice date. Filter by status, customer, order date range or invoice date range. GET /v6/sales-order/list.
輸入結構描述
{
"type": "object",
"properties": {
"status": {
"description": "Sales order status.",
"type": "string",
"enum": [
"New",
"Approved",
"Payment in Progress",
"Paid"
]
},
"customer_name": {
"description": "Customer name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"starts_with": {
"description": "Order name starts with this.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"start_date": {
"description": "Orders on or after this date.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"end_date": {
"description": "Orders on or before this date.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"invoice_start_date": {
"description": "Invoiced on or after this date.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"invoice_end_date": {
"description": "Invoiced on or before this date.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"external_transaction_id": {
"description": "External transaction id linked to the order.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"max": {
"description": "Results per page, 1-200 (sent as vintrace's \"max\").",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"first": {
"description": "Start index of the page (default 0; vintrace \"first\").",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_get_sales_order(sales_order_id, code)
One sales order by id, or by order code (for example VSO20): customer, items, prices, taxes and status. Give exactly one. GET /v6/sales-order/{id} or /v6/sales-order?code=.
輸入結構描述
{
"type": "object",
"properties": {
"sales_order_id": {
"description": "vintrace sales order id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"code": {
"description": "Sales order code, e.g. VSO20.",
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_parties(starts_with, category, max, first)
List parties: customers, growers, suppliers and owners, individuals or organisations, with address, phone and email. Filter by the start of the name and category. GET /v6/party/list.
輸入結構描述
{
"type": "object",
"properties": {
"starts_with": {
"description": "Surname (individuals) or company name starts with this.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"category": {
"description": "Party category (default All).",
"type": "string",
"enum": [
"All",
"Individuals",
"Organisations"
]
},
"max": {
"description": "Results per page, 1-200 (sent as vintrace's \"max\").",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"first": {
"description": "Start index of the page (default 0; vintrace \"first\").",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_get_party(party_id, name)
One party (customer, grower, supplier, owner) by id, or by exact name. Give exactly one. GET /v6/party/{id} or /v6/party?name=.
輸入結構描述
{
"type": "object",
"properties": {
"party_id": {
"description": "vintrace party id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"name": {
"description": "Exact party name.",
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_get_work_order(work_order_id)
One work order by id: every job with its steps, summary text, status and assignee. Find the id with vintrace_list_work_orders or vintrace_list_work_orders_v6. GET /v6/workorders/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"work_order_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "vintrace work order id (the number, not the TWL code)."
}
},
"required": [
"work_order_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_list_work_orders_v6(assigned_to, state, from_date, to_date, starts_with, ...)
Work orders from the operator's point of view (what is waiting for me / unassigned), with job counts, status and scheduled dates. Defaults to the last 7 days to 3 days ahead. GET /v6/workorders/list.
輸入結構描述
{
"type": "object",
"properties": {
"assigned_to": {
"description": "Assignment filter (default AVAILABLE_TO_ME).",
"type": "string",
"enum": [
"AVAILABLE_TO_ME",
"ANYONE",
"MINE_ONLY",
"UNASSIGNED"
]
},
"state": {
"description": "Status filter (default ANY).",
"type": "string",
"enum": [
"ANY",
"IN_PROGRESS",
"NOT_STARTED",
"SUBMITTED",
"INCOMPLETE"
]
},
"from_date": {
"description": "Scheduled on or after this date.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"to_date": {
"description": "Scheduled on or before this date.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"starts_with": {
"description": "Work order name starts with this.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"winery_id": {
"description": "Only this winery.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"max": {
"description": "Results per page, 1-200 (sent as vintrace's \"max\").",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 200
},
"first": {
"description": "Start index of the page (default 0; vintrace \"first\").",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢vintrace_search_items(type, starts_with, exact_match, first)
Look up names and ids of one kind of item: growers, owners, blocks, varietals, vintages, regions, programs, batches, products, tanks, barrels, bins and more. Use it to find the id or exact name another tool needs. GET /v6/search/list.
輸入結構描述
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"grading",
"owner",
"program",
"varietal",
"vintage",
"productState",
"region",
"block",
"grower",
"productCategory",
"batch",
"product",
"tank",
"vessel",
"containerEquipment",
"barrel",
"bin"
],
"description": "The kind of item to list."
},
"starts_with": {
"description": "Name starts with this.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"exact_match": {
"description": "True: the name must equal starts_with (default is a like match).",
"type": "boolean"
},
"first": {
"description": "Start index of the page (default 0; vintrace \"first\").",
"type": "integer",
"minimum": 0,
"maximum": 10000000
}
},
"required": [
"type"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡vintrace_add_stock_item_note(stock_item_id, detail, subject)
WRITE: adds a new note to a vintrace stock item (visible to everyone in the winery, recorded under the token's user). Adding the same note twice creates two notes. POST /v6/mrp/stock/{id}/notes.
輸入結構描述
{
"type": "object",
"properties": {
"stock_item_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "vintrace stock item id."
},
"detail": {
"type": "string",
"minLength": 1,
"maxLength": 4000,
"description": "The note text."
},
"subject": {
"description": "Optional subject line.",
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"stock_item_id",
"detail"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴vintrace_assign_work_order(work_order_id, job_id, assign_operator_id, reassign)
WRITE: assigns a work order to the token's own vintrace user (or to assign_operator_id), so it shows up in that operator's list. With reassign=true it takes over a work order already assigned to someone else. Check the work order first with vintrace_get_work_order. POST /v6/workorders/assign.
輸入結構描述
{
"type": "object",
"properties": {
"work_order_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "vintrace work order id."
},
"job_id": {
"description": "Only this job of the work order.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"assign_operator_id": {
"description": "vintrace user id to assign to (default: the token's user).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"reassign": {
"description": "Reassign even if it is already assigned to another operator (default false).",
"type": "boolean"
}
},
"required": [
"work_order_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴vintrace_deactivate_booking(booking_id)
WRITE: deactivates a fruit booking so it no longer counts as an active booking (the record is kept; it is not deleted). Use vintrace_list_bookings to find the booking id first. POST /v7/operation/bookings/{id}/deactivation.
輸入結構描述
{
"type": "object",
"properties": {
"booking_id": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "vintrace booking id."
}
},
"required": [
"booking_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社群
證據