Interface ToolExecutionContext

Defines the invocation context passed to a tool's execute method. This context provides the tool with essential information about the calling entity (GMI, Persona), the user, and the overall session, enabling context-aware tool execution.

ToolExecutionContext

interface ToolExecutionContext {
    gmiId: string;
    personaId: string;
    userContext: UserContext;
    correlationId?: string;
    sessionData?: Record<string, any>;
}

Properties

gmiId: string

The unique identifier of the GMI (Generalized Mind Instance) that is invoking the tool.

personaId: string

The unique identifier of the active Persona within the GMI that requested the tool execution.

userContext: UserContext

Contextual information about the end-user associated with the current interaction, which might include user ID, preferences, skill level, etc.

correlationId?: string

An optional identifier used to correlate this specific tool call with other operations, logs, or events across different parts of the system. Useful for tracing and debugging.

sessionData?: Record<string, any>

Optional. Ephemeral data relevant to the current session, potentially sourced from the GMI's working memory or the orchestrator. This allows tools to access dynamic session state if needed for their operation (e.g., user's current location, temporary files).