# Type Alias ToolPredicate

ToolPredicate: (tool: BaseTool, readonlyContext: ReadonlyContext) => boolean

Function to decide whether a tool should be exposed to LLM. Toolset implementer could consider whether to accept such instance in the toolset's constructor and apply the predicate in getTools method.

#### Type Declaration

- - (tool: BaseTool, readonlyContext: ReadonlyContext): boolean

  - #### Parameters

    - tool: BaseTool
    - readonlyContext: ReadonlyContext

    #### Returns boolean

- Defined in tools/base_toolset.ts:18