Skip to main content

Interface: AnyTool

Defined in: src/server/ai/assistant/tool.ts:41

Type-erased tool stored in the registry. Built via defineTool so the handler keeps its arg types.

Properties​

audited?​

readonly optional audited?: boolean

Defined in: src/server/ai/assistant/tool.ts:49

When true, a successful call should be written to audit_log (PII/financial reads).


description​

readonly description: string

Defined in: src/server/ai/assistant/tool.ts:43


name​

readonly name: string

Defined in: src/server/ai/assistant/tool.ts:42


params​

readonly params: ZodTypeAny

Defined in: src/server/ai/assistant/tool.ts:44


persistArgs?​

readonly optional persistArgs?: readonly string[]

Defined in: src/server/ai/assistant/tool.ts:53

Allowlist of arg keys safe to persist in the audit/message summary (everything else is dropped).


requiredDomain​

readonly requiredDomain: "billing" | "overview" | "business_dev" | "recruiting" | "onboarding" | "team" | "time" | "payroll" | "insights" | "settings" | "self"

Defined in: src/server/ai/assistant/tool.ts:47

Admin domain the caller must hold, or 'self' (contractor-owned data + cross-surface tools).


rowCap?​

readonly optional rowCap?: number

Defined in: src/server/ai/assistant/tool.ts:51

Hard cap on array outputs, enforced by the executor as a budget/PII backstop.


scope​

readonly scope: ToolScope

Defined in: src/server/ai/assistant/tool.ts:45

Methods​

run()​

run(ctx, args): Promise<ToolHandlerResult>

Defined in: src/server/ai/assistant/tool.ts:55

Run with args already validated against params.

Parameters​

ctx​

ToolContext

args​

unknown

Returns​

Promise<ToolHandlerResult>