purchase-mcp-server
Version:
Purchase and budget management server handling requisitions, purchase orders, expenses, budgets, and vendor management with ERP access for data extraction
147 lines (113 loc) • 8.27 kB
YAML
prompts:
- name: server_operating_instructions
description: General operating instructions for this MCP server
arguments: []
content: |
# Maritime Purchase & Procurement Server - Operational Guide
## Core Workflow Patterns
### 1. Vessel Procurement Status Overview
**Scenario:** Get comprehensive procurement status for vessel
**Steps:**
1. `get_vessel_details("Vessel Name")` → Get IMO if needed
2. `list_requisitions_by_status(imo="[IMO]", purchaseRequisitionStatus="APPROVED")` → Active requisitions
3. `list_overdue_open_requisitions(imo="[IMO]", daysOverdue=30, stage="OPEN")` → Overdue items
4. `list_recent_urgent_requisitions(imo="[IMO]", daysAgo=30)` → Recent urgent items
5. `get_purchase_orders_with_forwarders(imo="[IMO]")` → Items ready for delivery
**Result:** Complete vessel procurement picture with priority actions
### 2. Urgent Procurement Management
**Scenario:** Handle urgent and critical requisitions requiring immediate attention
**Steps:**
1. `list_recent_urgent_requisitions(imo="[IMO]", daysAgo=7)` → Recent urgent items
2. `list_recent_requisitions_by_order_priority(imo="[IMO]", daysAgo=30, orderPriority="URGENT")` → All urgent items
3. `list_recent_requisitions_by_order_priority(imo="[IMO]", daysAgo=30, orderPriority="DEFECT")` → Defect-related items
4. `list_purchase_orders_by_status(imo="[IMO]", purchaseOrderStatus="ORDERED")` → Status of urgent orders
**Result:** Urgent procurement action plan
### 3. Budget Variance Analysis
**Scenario:** Monthly budget review and variance analysis
**Steps:**
1. `get_monthly_opex_budget_variance(imo="[IMO]")` → Monthly variance overview
2. `get_budget_status_summary_ytd(imo="[IMO]")` → Year-to-date budget status
3. `get_current_year_commited_cost(imo="[IMO]")` → Committed costs analysis
4. `list_committed_cost_expenses(imo="[IMO]")` → Detailed committed cost breakdown
5. `list_top_expenses_by_category(imo="[IMO]", topN=5)` → Top spending categories
**Result:** Complete budget performance analysis with variance explanations
### 4. Purchase Order Follow-up
**Scenario:** Track purchase orders and delivery status
**Steps:**
1. `list_purchase_orders_by_status(imo="[IMO]", purchaseOrderStatus="ORDERED")` → Orders in progress
2. `get_purchase_orders_with_forwarders(imo="[IMO]")` → Items with forwarders
3. `purchase_orders_open_more_than_180_days(imo="[IMO]")` → Long-standing orders
4. `list_purchase_orders_by_status(imo="[IMO]", purchaseOrderStatus="WITH FORWARDER")` → Items ready for collection
5. `get_purchase_order_details(purchaseOrderNumber="[PO_NUMBER]")` → Detailed order information
**Result:** Purchase order action plan with delivery priorities
### 5. Procurement Category Analysis
**Scenario:** Analyze spare parts and stores procurement patterns
**Steps:**
1. `list_requisitions_by_type_and_stage(imo="[IMO]", purchaseRequisitionType="SPARE PARTS", purchaseOrderStage="OPEN")` → Open spares
2. `list_requisitions_by_type_and_stage(imo="[IMO]", purchaseRequisitionType="STORES", purchaseOrderStage="CLOSE")` → Recent stores supply
3. `list_requisitions_by_type_and_stage(imo="[IMO]", purchaseRequisitionType="MAINTENANCE CHEMICALS", purchaseOrderStage="OPEN")` → Chemical procurement
4. `smart_purchase_table_search(query="*", filters={"imo": IMO, "purchaseRequisitionType": "SPARE PARTS", "orderPriority": "URGENT"})` → Urgent spares
**Result:** Category-wise procurement analysis with supply patterns
### 6. Vendor Management and Sourcing
**Scenario:** Find vendors for specific services and locations
**Steps:**
1. `find_relevant_vendors(service="main engine spares", locationRegion="Singapore")` → Regional suppliers
2. `get_vendor_contact_details(vendorName="[Vendor Name]")` → Vendor contact information
**Result:** Vendor selection with contact details
## Tool Combination Rules
### Always start with vessel identification:
- `get_vessel_details()` first if vessel name provided without IMO
- Use IMO consistently across all subsequent procurement queries
### For procurement status assessment:
- Start with `list_requisitions_by_status()` for active requisitions
- Check `list_overdue_open_requisitions()` for urgent items
- Use `smart_purchase_table_search()` for complex queries
### For budget analysis workflow:
- `get_monthly_opex_budget_variance()` for current period performance
- `get_budget_status_summary_ytd()` for overall budget picture
- `get_current_year_commited_cost()` for future financial commitments
### For purchase order tracking:
- `list_purchase_orders_by_status()` for current order status
- `purchase_orders_open_more_than_180_days()` for overdue orders
- `get_purchase_order_details()` for specific order investigation
### For vendor management:
- `find_relevant_vendors()` for sourcing new suppliers
- `get_vendor_contact_details()` for communication
## Common Procurement Questions & Patterns
- **"What's the procurement status of [Vessel]?"** → `list_requisitions_by_status(status="APPROVED")` → `list_overdue_open_requisitions()`
- **"Show urgent requisitions"** → `list_recent_urgent_requisitions()` → `list_recent_requisitions_by_order_priority(orderPriority="URGENT")`
- **"Budget variance this month"** → `get_monthly_opex_budget_variance()` → `get_current_year_commited_cost()`
- **"Purchase orders ready for delivery"** → `get_purchase_orders_with_forwarders()` → `list_purchase_orders_by_status(status="WITH FORWARDER")`
- **"Find spare parts vendors in [Location]"** → `find_relevant_vendors(service="spare parts", locationRegion="[Location]")`
- **"Overdue purchase requisitions"** → `list_overdue_open_requisitions(daysOverdue=30, stage="OPEN")`
- **"Top spending categories"** → `list_top_expenses_by_category(topN=5)` → `smart_expense_search(query="*", sort_by="expenseAmount")`
## Data Interpretation Guidelines
### Priority Indicators:
- `orderPriority="URGENT"` = immediate procurement action required
- `purchaseRequisitionStatus="APPROVED"` = ready for ordering
- `purchaseOrderStatus="ORDERED"` = in progress with vendor
- `stage="OPEN"` with daysOverdue > 30 = requires follow-up action
### Critical Fields for Decision Making:
- `purchaseRequisitionDate`, `targetDate` for timeline management
- `orderPriority`, `purchaseRequisitionType` for categorization
- `purchaseOrderAmount`, `budgetAmount` for financial control
- `vendorOrsupplierName`, `deliveryLocation` for logistics planning
### Budget Management Priorities:
1. Budget categories exceeding variance thresholds
2. High committed cost percentages affecting cash flow
3. Urgent requisitions impacting operational budgets
4. Long-standing orders tying up financial resources
### Procurement Workflow Priorities:
1. URGENT and DEFECT priority requisitions
2. Overdue open requisitions past target dates
3. Purchase orders open >180 days
4. Items with forwarders ready for collection
5. Budget variance categories requiring attention
## Error Prevention
- Always get schema first using `get_budget_expense_table_schema()` before complex budget/expense queries
- Validate vessel IMO through `get_vessel_details` for vessel name queries
- Use exact enum values for `purchaseRequisitionType`, `orderPriority`, and status fields
- Cross-reference procurement status with budget availability before approving large orders
- Verify vendor contact details are current before initiating procurement actions
- Use appropriate date ranges for overdue calculations and recent activity analysis
- Combine multiple search approaches (status-based, priority-based, category-based) for comprehensive analysis