import type { Agent } from './agent'; import type { RunContext } from './runContext'; import type { MCPTool } from './mcp'; import type { UnknownContext } from './types'; /** Context information available to tool filter functions. */ export interface MCPToolFilterContext { /** The current run context. */ runContext: RunContext; /** The agent requesting the tools. */ agent: Agent; /** Name of the MCP server providing the tools. */ serverName: string; } /** Context information available to MCP tool meta resolver functions. */ export interface MCPToolMetaContext { /** The current run context. */ runContext: RunContext; /** Name of the MCP server. */ serverName: string; /** Name of the tool being invoked. */ toolName: string; /** Parsed tool arguments. */ arguments: Record | null; } /** A function that produces MCP request metadata (`_meta`) for tool calls. */ export type MCPToolMetaResolver = (context: MCPToolMetaContext) => Promise | null | undefined> | Record | null | undefined; /** A function that determines whether a tool should be available. */ export type MCPToolFilterCallable = (context: MCPToolFilterContext, tool: MCPTool) => Promise; /** Static tool filter configuration using allow and block lists. */ export interface MCPToolFilterStatic { /** Optional list of tool names to allow. */ allowedToolNames?: string[]; /** Optional list of tool names to block. */ blockedToolNames?: string[]; } /** Convenience helper to create a static tool filter. */ export declare function createMCPToolStaticFilter(options?: { allowed?: string[]; blocked?: string[]; }): MCPToolFilterStatic | undefined;