FabricFabricSDK
Portal SDK

Workspaces

List and RAG-query knowledge bases attached to your projects.

Workspaces are RAG-backed knowledge bases in the Fabric portal. They live under a project and accumulate documents (PDFs, markdown, transcripts, etc.) that you can semantically query.

fabric_list_workspaces

> What workspaces does the Q4 launch project have?

Input: { projectId?: string } — filter to one project, or omit for all workspaces in the active org.

Output: { workspaces: Array<{ id, name, description, projectId, documentCount, updatedAt }> }

fabric_get_workspace

> Show me the engineering-handbook workspace.

Input: { workspaceId: string }

Output: { workspace: { id, name, description, documents: Array<{ id, name, type, size, updatedAt }> } }

fabric_query_workspace

Run a semantic query and get back ranked passages with citations.

> Search the engineering-handbook workspace for "incident response runbook".

Input:

{
  workspaceId: string,
  query: string,
  limit?: number    // default 10
}

Output:

{
  results: Array<{
    documentId: string,
    documentName: string,
    snippet: string,
    score: number,
    pageNumber?: number
  }>
}

Use this to ground agent answers in actual portal content — the snippet + score lets the model decide whether to cite or fall back to general knowledge.

fabric_upload_workspace_document

> Upload this Q4 sales report PDF to the revenue-ops workspace.

Input:

{
  workspaceId: string,
  name: string,
  content: string,        // base64-encoded file contents
  mimeType: string
}

Output: { documentId, status: "indexing" | "ready" }

The portal indexes asynchronously. Poll fabric_get_workspace to check when the document moves from indexing to ready.