/** * postgres-mcp - Tool Filtering System * * Parses and applies tool filter rules from environment variables. * Compatible with db-mcp filtering syntax. * * Syntax: * -group → Disable all tools in a group * +group → Enable all tools in a group * -tool → Disable a specific tool * +tool → Enable a specific tool (after group disable) */ import type { ToolGroup, ToolFilterConfig, ToolDefinition } from "../types/index.js"; /** * Default tool groups and their member tools. * This serves as the canonical mapping of tools to groups. */ export { TOOL_GROUPS } from "./tool-constants.js"; /** * Get all tool names from all groups (cached) */ export declare function getAllToolNames(): string[]; /** * Get the group for a specific tool (O(1) lookup) */ export declare function getToolGroup(toolName: string): ToolGroup | undefined; /** * Derive the set of enabled ToolGroup names from a set of enabled tool names. * A group is considered enabled if at least one of its tools is in the set. */ export declare function getEnabledGroups(enabledTools: Set): Set; /** * Check if a name is a valid tool group */ export declare function isToolGroup(name: string): name is ToolGroup; /** * Parse a tool filter string into structured rules * * @param filterString - The filter string (e.g., "starter" or "-vector,-postgis,+pg_vector_search") * @returns Parsed filter configuration */ export declare function parseToolFilter(filterString: string | undefined): ToolFilterConfig; /** * Filter a list of tool definitions based on filter configuration */ export declare function filterTools(tools: ToolDefinition[], config: ToolFilterConfig): ToolDefinition[]; /** * Get the tool filter from environment variable */ export declare function getToolFilterFromEnv(): ToolFilterConfig; /** * Generate a summary of the current filter configuration */ export declare function getFilterSummary(config: ToolFilterConfig): string; //# sourceMappingURL=tool-filter.d.ts.map