mcp-use TypeScript API
    Preparing search index...

    Interface ModelContextHandle

    Shared selection and synchronization API for one view runtime.

    interface ModelContextHandle {
        attachments: readonly ModelContextAttachment[];
        error: Error | null;
        pending: boolean;
        add(
            key: string,
            block: ModelContextBlock,
        ): Promise<ModelContextOperationResult>;
        clearAttachments(): Promise<ModelContextOperationResult>;
        remove(key: string): Promise<ModelContextOperationResult>;
    }
    Index
    attachments: readonly ModelContextAttachment[]

    Effective selection, which can include unsynced entries after a failure.

    error: Error | null

    Shared delivery or reconciliation error; individual validation errors reject.

    pending: boolean

    True during initialization, image preparation, batching, or delivery; false is not proof of sync.