/** * Memory Journal MCP Server - Tool Filtering * * Configurable tool filtering system with groups and meta-groups. * Matches mysql-mcp filtering syntax and patterns. */ import type { ToolGroup, ToolFilterConfig } from '../types/index.js'; import { TOOL_GROUPS, META_GROUPS } from './tool-constants.js'; export type { ToolFilterConfig } from '../types/index.js'; export { TOOL_GROUPS, META_GROUPS }; /** * Tools that are always enabled regardless of filter configuration. * Prevents agents from locking themselves out of the config system or Code Mode. */ export declare const ALWAYS_ENABLED_TOOLS: readonly ["update_configuration", "mj_execute_code"]; /** * Get all tool names across all groups */ export declare function getAllToolNames(): string[]; /** * Get the group for a specific tool */ export declare function getToolGroup(toolName: string): ToolGroup | undefined; /** * Determine which tool groups have at least one enabled tool. * Used by instruction generation to conditionally include/exclude sections. */ export declare function getEnabledGroups(enabledTools: Set): Set; /** * Parse a tool filter string into configuration * * Syntax: * - `starter` - Use starter preset (whitelist mode) * - `core,search` - Enable specific groups (whitelist mode) * - `full,-admin` - All tools except admin group * - `starter,-delete_entry` - Starter without specific tool * - `+semantic_search` - Add specific tool to current set */ export declare function parseToolFilter(filterString: string): ToolFilterConfig; /** * Check if a tool is enabled based on filter string */ export declare function isToolEnabled(toolName: string, filterConfig: ToolFilterConfig): boolean; /** * Filter tools array based on filter configuration */ export declare function filterTools(tools: T[], filterConfig: ToolFilterConfig): T[]; /** * Get tool filter from environment variable */ export declare function getToolFilterFromEnv(): ToolFilterConfig | null; /** * Calculate token savings from filtering */ export declare function calculateTokenSavings(totalTools: number, enabledTools: number, avgTokensPerTool?: number): { reduction: number; savedTokens: number; }; /** * Get human-readable filter summary */ export declare function getFilterSummary(filterConfig: ToolFilterConfig): string; //# sourceMappingURL=tool-filter.d.ts.map