syia-mcp-vessel-accounts
Version:
MCP server for vessel account management including EyeShare API integration, vessel expenses, and purchase orders
413 lines • 17.9 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: 100, max: 100)",
minimum: 1,
maximum: 100,
default: 100
},
extractPurchaseOrdersOnly: {
type: "boolean",
description: "Whether to extract only PurchaseOrders array from response (default: true)",
default: true
},
extractPoLinesOnly: {
type: "boolean",
description: "Whether to extract only PoLines arrays from all purchase orders (default: false). When true, returns only the filtered PoLines data without PoHead or other metadata.",
default: false
}
},
additionalProperties: false
}
},
{
name: "generate_committed_cost_report",
description: "Generate a comprehensive committed cost report for a single vessel using the vessel_committed_cost_analyzer script. This tool executes the Python script with proper environment variables from the MCP server configuration. IMPORTANT: The process runs in background and returns immediately with status. After calling this tool, you MUST wait 15 seconds, then use check_report_status tool to verify completion. Continue checking every 15 seconds for up to 3 minutes. Do not end the conversation until reports are confirmed ready.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Single vessel code (e.g., ACET) OR comma-separated multiple vessel codes (e.g., ACET,BASC,BWET). Each vessel code must be exactly 4 uppercase letters.",
pattern: "^[A-Z]{4}(,[A-Z]{4})*$"
},
endDate: {
type: "string",
description: "End date for analysis in YYYY-MM-DD format (default: today)",
format: "date"
},
outputPath: {
type: "string",
description: "Output directory path for generated reports (default: SIYA workspace directory)"
}
},
required: ["vesselCode"],
additionalProperties: false
}
},
{
name: "check_report_status",
description: "Check if committed cost report files have been generated for a vessel. Use this tool to verify if background report generation is complete. Returns list of generated files and their details.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Vessel code to check reports for (e.g., ACET, BWET)",
pattern: "^[A-Z]{4}$"
},
outputPath: {
type: "string",
description: "Directory path to check for reports (default: current workspace directory)"
}
},
required: ["vesselCode"],
additionalProperties: false
}
},
{
name: "analyze_vessel_expenses",
description: "Use AI to analyze and summarize vessel expenses data. Provides intelligent insights, trends, and recommendations based on expense patterns.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Vessel code to analyze expenses for (e.g., BASC, BWET)",
pattern: "^[A-Z]{4}$"
},
limit: {
type: "number",
description: "Maximum number of expense records to analyze (default: 1000)",
maximum: 5000,
default: 1000
}
},
required: ["vesselCode"],
additionalProperties: false
}
},
{
name: "analyze_vessel_invoices",
description: "Use AI to analyze invoice data for a vessel. Provides financial insights, payment analysis, and supplier performance evaluation.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Vessel code to analyze invoices for (e.g., BASC, BWET)",
pattern: "^[A-Z]{4}$"
},
limit: {
type: "number",
description: "Maximum number of invoices to analyze (default: 100)",
maximum: 1000,
default: 100
},
fromDate: {
type: "string",
format: "date-time",
description: "Start date for invoice analysis (ISO 8601 format)"
},
toDate: {
type: "string",
format: "date-time",
description: "End date for invoice analysis (ISO 8601 format)"
}
},
required: ["vesselCode"],
additionalProperties: false
}
},
{
name: "analyze_purchase_orders",
description: "Use AI to analyze purchase order data for a vessel. Provides procurement insights, delivery performance, and budget utilization analysis.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Vessel code to analyze purchase orders for (e.g., BASC, BWET)",
pattern: "^[A-Z]{4}$"
},
limit: {
type: "number",
description: "Maximum number of purchase orders to analyze (default: 500)",
maximum: 2000,
default: 500
}
},
required: ["vesselCode"],
additionalProperties: false
}
},
{
name: "summarize_committed_cost_report",
description: "Generate AI summary of committed cost analysis from existing Excel reports. Must be used AFTER generate_committed_cost_report tool has completed. Provides executive summary of the comprehensive committed cost analysis.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Vessel code to summarize committed cost reports for (e.g., BASC, BWET)",
pattern: "^[A-Z]{4}$"
},
outputPath: {
type: "string",
description: "Directory path where committed cost reports are located (default: current workspace)"
}
},
required: ["vesselCode"],
additionalProperties: false
}
},
{
name: "detect_data_anomalies",
description: "Use AI to detect anomalies, inconsistencies, and unusual patterns in vessel financial data. Helps identify potential issues or optimization opportunities.",
inputSchema: {
type: "object",
properties: {
vesselCode: {
type: "string",
description: "Vessel code to check for anomalies (e.g., BASC, BWET)",
pattern: "^[A-Z]{4}$"
},
dataType: {
type: "string",
description: "Type of data to analyze for anomalies",
enum: ["expenses", "invoices", "purchase_orders", "all"],
default: "all"
},
limit: {
type: "number",
description: "Maximum number of records to analyze per data type (default: 500)",
maximum: 2000,
default: 500
}
},
required: ["vesselCode"],
additionalProperties: false
}
}
];
//# sourceMappingURL=schema.js.map