List Workspaces
list_workspacesRetrieves the list of all AFFiNE workspaces available for the authenticated user.
Instructions
List all available AFFiNE workspaces
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/util/mcp.ts:1-33 (helper)Helper utility 'text()' imported from '../util/mcp.js' that formats the response content for MCP, used by listWorkspacesHandler to return results.
function cloneJsonValue<T>(data: T): T { if (data === undefined) { return data; } return JSON.parse(JSON.stringify(data)) as T; } export function text(data: unknown) { if (typeof data === "string") { return { content: [{ type: "text" as const, text: data }] }; } if (data !== null && typeof data === "object" && !Array.isArray(data)) { const structuredContent = cloneJsonValue(data); return { content: [{ type: "text" as const, text: JSON.stringify(structuredContent) }], structuredContent, }; } return { content: [{ type: "text" as const, text: JSON.stringify(data) }], }; } export function receipt(kind: string, data: Record<string, unknown>) { return text({ kind, ok: true, ...data, }); }