voyage-and-consumption-mcp-server
Version:
Voyage and consumption management server handling vessel voyages, fuel consumption, performance monitoring, and operational data with ERP access for data extraction
141 lines (112 loc) • 5.95 kB
JavaScript
/**
* Prompts for Voyage & Consumption MCP Server
* Converted from Python to TypeScript
*/
export const promptList = [
{
name: "voyage_server_operating_instructions",
description: "general instructions for the user to work with the voyage related information",
arguments: []
}
];
const MAIN_PROMPT = `
Scenario: Get comprehensive current operational status for vessel
Step 1: get_vessel_details("Vessel Name") → Get IMO if needed
Step 2: get_live_position_from_navtor(imo="IMO") → Current live position and ETA
Step 3: get_vessel_eta_cargo_activity(imo="IMO") → Cargo activity and itinerary from emails
Step 4: get_vessel_fuel_consumption_rob(imo="IMO") → Current fuel status
Step 5: get_live_weather_by_coordinates(latitude="[LAT]", longitude="[LON]", timestamp="[TIME]") → Weather conditions
Step 6: get_charter_party_compliance_status(imo="IMO") → Charter compliance
Result: Complete current operational picture with position, cargo, fuel, and weather
Scenario: "Analyze fuel consumption and plan bunker requirements"
Step 1: get_vessel_fuel_consumption_rob(imo="IMO") → Current fuel ROB and consumption
Step 2: get_vessel_fuel_consumption_history(imo="IMO", start_date="YYYY-MM-DD", end_date="YYYY-MM-DD") → Historical consumption patterns
Result: Comprehensive fuel analysis with bunker planning recommendations
Scenario: "Check all lubricating oil consumption and ROB levels"
Step 1: get_me_cylinder_oil_consumption_and_rob(imo="IMO") → ME cylinder oil status
Step 2: get_mecc_aecc_consumption_and_rob(imo="IMO") → Crankcase oil status
Result: Complete lubricating oil analysis with consumption trends and ROB planning
Scenario: "Review fresh water production, consumption and planning"
Step 1: get_fresh_water_production_consumption_and_rob(imo="IMO") → Fresh water statistics
Result: Fresh water management plan with production optimization
Always start with vessel identification:
- get_vessel_details() first if vessel name provided without IMO
- Use IMO consistently across all subsequent voyage queries
For vessel itinerary, cargo activity and weather assessment:
- get_live_position_from_navtor() provides current position and ETA
- get_vessel_eta_cargo_activity() adds cargo activity context from emails
- get_live_weather_by_coordinates() requires position data from live position tool
For fuel analysis workflow:
- get_vessel_fuel_consumption_rob() for current status
- get_vessel_fuel_consumption_history() for historical trends
For operational monitoring:
- Use pre-computed MongoDB tools (get_voyage_details_from_shippalm, fuel/lube ROB tools) for quick answers
- smart_voyage_search() for complex historical analysis
- Always get schema first using get_voyage_table_schema() before voyage_table_search()
For compliance checking:
- get_charter_party_compliance_status() for charter requirements
- Cross-reference with fuel consumption data
## Common Voyage Questions & Patterns
"Where is [Vessel] now?" → get_live_position_from_navtor() → get_live_weather_by_coordinates()
"Fuel consumption status" → get_vessel_fuel_consumption_rob() → get_vessel_fuel_consumption_history()
"When will vessel arrive?" → get_live_position_from_navtor() → get_vessel_eta_cargo_activity()
"Lube oil consumption" → get_me_cylinder_oil_consumption_and_rob() → get_mecc_aecc_consumption_and_rob()
"Fresh water status" → get_fresh_water_production_consumption_and_rob()
"Charter compliance" → get_charter_party_compliance_status() → get_voyage_details_from_shippalm()
## Data Interpretation Guidelines
Priority Indicators:
- vesselActivity="steaming" = active voyage operations
- reportdate within last 24 hours = current operational data
- steamingTime > 20 hours = continuous voyage operations
Critical Fields for Decision Making:
- latitude, longitude, timestamp for position tracking
- nextPortName, etaToNextPort for voyage planning
- fuel ROB levels and consumption rates for bunker planning
- vesselActivity and cargo operations for operational status
1. Current position and ETA accuracy
2. Fuel ROB levels and consumption efficiency
3. Charter party compliance status
4. Fresh water production vs consumption
5. Lubricating oil consumption trends
6. Weather conditions affecting operations
1. Always get current position from get_live_position_from_navtor() first
2. Extract latitude, longitude, and timestamp from position data
3. Pass all three parameters to get_live_weather_by_coordinates()
4. Correlate weather conditions with operational performance
## Error Prevention
- Always get position data from get_live_position_from_navtor() before requesting weather
- Always get schema first using get_voyage_table_schema() before voyage_table_search()
- Validate vessel IMO through get_vessel_details for vessel name queries
- Use appropriate date ranges for historical fuel consumption analysis
- Verify timestamp formats when passing to weather API
- Use smart_voyage_search() for complex queries requiring multiple filters
- Combine multiple data sources (real-time, historical, pre-computed) for comprehensive analysis`;
export function getPrompt(name, args) {
if (name === "voyage_server_operating_instructions") {
return getGeneralInstructions(args);
}
else {
throw new Error(`Unknown prompt: ${name}`);
}
}
function getGeneralInstructions(args) {
const messages = [
{
role: "user",
content: {
type: "text",
text: MAIN_PROMPT
}
}
];
return { messages };
}
//# sourceMappingURL=index.js.map