import type { StandardSchemaV1 } from "@standard-schema/spec" export namespace Tool { interface Metadata { [key: string]: any } export type Context = { sessionID: string messageID: string abort: AbortSignal metadata(input: { title?: string; metadata?: M }): void } export interface Info { id: string description: string parameters: Parameters execute( args: StandardSchemaV1.InferOutput, ctx: Context, ): Promise<{ title: string metadata: M output: string }> } export function define( input: Info, ): Info { return input } }