mcp-vessel-accounts
Version:
MCP server for vessel account management including EyeShare API integration, vessel expenses, and purchase orders
239 lines • 10.1 kB
JavaScript
export const toolDefinitions = [
{
name: "get_vessels",
description: "Get all vessels from EyeShare API. Returns a list of all vessels with their codes and names extracted from the company hierarchy. The vessel codes can be used in the search_invoices tool as CompanyCode filter.",
inputSchema: {
type: "object",
properties: {},
additionalProperties: false
}
},
{
name: "search_invoices",
description: "Search for invoices in EyeShare API. Can filter by vessel, date ranges, amounts, status, supplier, currency, urgency, credit notes, and invoice numbers. Also supports getting specific invoice details by ID.",
inputSchema: {
type: "object",
properties: {
vesselKey: {
type: "string",
description: "Vessel key to filter invoices by specific vessel"
},
invoiceId: {
type: "string",
description: "Specific invoice ID to get details for (alternative to vessel filtering)"
},
invoiceNumber: {
type: "string",
description: "Invoice number to filter by (supports partial matching)"
},
fromDate: {
type: "string",
format: "date-time",
description: "Start date for invoice search (ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ)"
},
toDate: {
type: "string",
format: "date-time",
description: "End date for invoice search (ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ)"
},
dateField: {
type: "string",
description: "Date field to filter on (default: Head.InvoiceDate)",
default: "Head.InvoiceDate"
},
minAmount: {
type: "number",
description: "Minimum invoice amount"
},
maxAmount: {
type: "number",
description: "Maximum invoice amount"
},
status: {
type: "string",
description: "Invoice status filter",
enum: ["Draft", "Submitted", "Approved", "Rejected", "Paid"]
},
supplier: {
type: "string",
description: "Supplier name or code to filter by"
},
currency: {
type: "string",
description: "Currency code to filter by (e.g., USD, EUR, BHD)"
},
urgent: {
type: "boolean",
description: "Filter for urgent invoices only"
},
creditNote: {
type: "boolean",
description: "Filter for credit notes only"
},
vesselCode: {
type: "string",
description: "Vessel code to filter by (used as CompanyCode in API filter). This should be the 'code' value from the get_vessels response."
},
limit: {
type: "number",
description: "Maximum number of results to return",
minimum: 1,
maximum: 10000
},
skip: {
type: "number",
description: "Number of results to skip for pagination",
default: 0,
minimum: 0
}
},
additionalProperties: false
}
},
{
name: "download_attachment",
description: "Download an attachment from an invoice or document in EyeShare. Returns the file as base64 encoded data.",
inputSchema: {
type: "object",
properties: {
attachmentId: {
type: "string",
description: "The unique identifier of the attachment"
},
documentId: {
type: "string",
description: "The unique identifier of the document"
},
version: {
type: "number",
description: "Version number of the attachment (default: 0)",
default: 0
}
},
required: ["attachmentId", "documentId"],
additionalProperties: false
}
},
{
name: "vessel_expenses",
description: "Get vessel expenses data from ShipNet system (budget_expenses_raw_data collection) with category lookup and vessel code filtering. Uses MongoDB environment variables for connection.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Vessel code to filter vessel expenses (optional)"
},
limit: {
type: "number",
description: "Maximum number of documents to return",
maximum: 10000
},
timeout: {
type: "number",
description: "Query timeout in milliseconds (max 5 minutes)",
maximum: 300000
}
},
additionalProperties: false
}
},
{
name: "purchase_orders",
description: "Get purchase order data from ShipPalm V2 and V3 systems (purchase_order collection) with vessel code filtering. Uses MongoDB environment variables for connection.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Vessel code to filter purchase orders (optional)"
},
limit: {
type: "number",
description: "Maximum number of documents to return",
maximum: 10000
},
timeout: {
type: "number",
description: "Query timeout in milliseconds (max 5 minutes)",
maximum: 300000
}
},
additionalProperties: false
}
},
{
name: "vessel_expenses_previous_year",
description: "Get vessel expenses data from the previous year (budget_expenses_previous_year_raw_data collection) with category lookup and vessel code filtering. Uses MongoDB environment variables for connection.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Vessel code to filter vessel expenses (optional)"
},
limit: {
type: "number",
description: "Maximum number of documents to return",
maximum: 10000
},
timeout: {
type: "number",
description: "Query timeout in milliseconds (max 5 minutes)",
maximum: 300000
}
},
additionalProperties: false
}
},
{
name: "get_purchase_order_by_invoice",
description: "Get purchase order data from EyeShare API using invoice ID(s) and vessel code(s). Supports both single and parallel processing of multiple invoices. Returns only the PurchaseOrders array from each response. Uses parallel processing with configurable workers for multiple invoices.",
inputSchema: {
type: "object",
properties: {
invoiceId: {
type: "string",
description: "Single invoice ID obtained from the search_invoices tool (e.g., baf32017-db2d-41b5-ba01-bb887c340956). Use this for single invoice processing."
},
vesselCode: {
type: "string",
description: "Single vessel code to filter purchase orders (e.g., BWKZ). Use this for single invoice processing."
},
invoiceConfigs: {
type: "array",
description: "Array of invoice configurations for parallel processing. Each object should contain invoiceId and vesselCode.",
items: {
type: "object",
properties: {
invoiceId: {
type: "string",
description: "Invoice ID obtained from the search_invoices tool"
},
vesselCode: {
type: "string",
description: "Vessel code for this invoice"
}
},
required: ["invoiceId", "vesselCode"],
additionalProperties: false
}
},
maxWorkers: {
type: "number",
description: "Maximum number of parallel workers for batch processing (default: 500, max: 500)",
minimum: 1,
maximum: 500,
default: 500
},
extractPurchaseOrdersOnly: {
type: "boolean",
description: "Whether to extract only PurchaseOrders array from response (default: true)",
default: true
}
},
additionalProperties: false
}
}
];
//# sourceMappingURL=schema.js.map