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
33 lines (32 loc) • 1.13 kB
TypeScript
import { ToolResponse } from '../types/index.js';
export interface FilterStats {
itemsFiltered: number;
unauthorizedImos: string[];
processingTimeMs: number;
}
/**
* Main function to filter tool responses by company IMO authorization
* @param response - Tool response to filter
* @returns Filtered tool response
*/
export declare function filterResponseByCompanyImos(response: ToolResponse): Promise<ToolResponse>;
/**
* Filter search results before artifact creation to prevent unauthorized data leakage
* This is critical for tools like universal_voyage_search that create persistent snapshots
* @param searchResults - Array of search result objects
* @returns Object with filtered results and statistics
*/
export declare function filterSearchResultsByCompanyImo(searchResults: any[]): {
filtered: any[];
stats: FilterStats;
};
/**
* Get filtering statistics for monitoring
* @returns Object with current filtering configuration
*/
export declare function getFilteringStats(): {
companyName: string;
isFilteringEnabled: boolean;
companyImoCount: number;
isAdminCompany: boolean;
};