Sanity Library Reference Docs
    Preparing search index...

    Interface ContextDatasetSourceConfigBeta

    A Sanity dataset that a Context MCP endpoint serves, as passed to defineContextMcpEndpoint. This feature is subject to breaking changes.

    interface ContextDatasetSourceConfig {
        id: string | ResourceRef<"sanity.project.dataset">;
        perspective?: "published" | "drafts" | "raw" | null;
        semanticSearch?: boolean | null;
        type: "dataset";
        workspace?: string | null;
    }
    Index

    Properties

    id: string | ResourceRef<"sanity.project.dataset">

    The dataset: a dataset resource from defineDataset or referenceDataset, or the dataset as <projectId>.<datasetName>, for example abc123.production.

    perspective?: "published" | "drafts" | "raw" | null

    The perspective agents query the dataset with. null uses published.

    semanticSearch?: boolean | null

    Whether agents can use semantic search on the dataset. false turns it off. true or null use it while the dataset has embeddings enabled.

    type: "dataset"
    workspace?: string | null

    The studio workspace whose schema agents use, by name. null uses the studio's first workspace.