Public declaration syntax from forge-ts/packages/forge-core/src/tool.ts Original source SHA-256: d3eaca580e16e96ef69258de0045ed2a06de6f2afe19fe0eb8d5b24c67af338d Function bodies and constant values are omitted. This is not the complete implementation. Source line 29 export const ToolTier /* type inferred in source */; Source line 49 export type ToolTier = (typeof ToolTier)[keyof typeof ToolTier]; Source line 69 export function requiresAuthorization(tier: ToolTier): boolean; Source line 91 export interface ToolDefinition { /** Unique tool name. */ readonly name: string; /** Human-readable description shown to the model. */ readonly description: string; /** JSON Schema defining the tool's parameters. */ readonly parameters: JsonSchema; /** Tier classification (Platform/External/Embedded). */ readonly tier: ToolTier; } Source line 117 export function buildToolDefinition(name: string): ToolDefinitionBuilder; Source line 126 export class ToolDefinitionBuilder { constructor(name: string); description(desc: string): this; parameters(schema: JsonSchema): this; tier(tier: ToolTier): this; build(): ToolDefinition; } Source line 192 export interface ToolCall { /** Unique identifier for this call (used to match with results). */ readonly id: string; /** The tool name being invoked. */ readonly name: string; /** JSON arguments for the tool. */ readonly arguments: unknown; } Source line 206 export interface ToolResult { /** The tool call ID this result corresponds to. */ readonly toolCallId: string; /** The tool name. */ readonly name: string; /** The result content (stringified). */ readonly content: string; /** Whether the tool execution resulted in an error. */ readonly isError: boolean; } Source line 226 export const ToolApprovalDecision /* type inferred in source */; Source line 236 export type ToolApprovalDecision = (typeof ToolApprovalDecision)[keyof typeof ToolApprovalDecision]; Source line 245 export type ToolApproval = | { readonly decision: 'approve' } | { readonly decision: 'deny'; readonly reason: string } | { readonly decision: 'modify'; readonly arguments: unknown }; Source line 255 export function approve(): ToolApproval; Source line 265 export function deny(reason: string): ToolApproval; Source line 275 export function modify(args: unknown): ToolApproval;