diff --git a/.changeset/lazy-webhooks-sign.md b/.changeset/lazy-webhooks-sign.md new file mode 100644 index 0000000..9513e50 --- /dev/null +++ b/.changeset/lazy-webhooks-sign.md @@ -0,0 +1,5 @@ +--- +'@taskade/mcp-openapi-codegen': minor +--- + +New `nameOverrides` codegen/parser option: explicit tool-name overrides keyed by `" "` (e.g. `'post /webhooks': 'createWebhook'`). An override beats both `operationId` and the path-derived fallback, disambiguating REST-shaped operations without `operationId` whose derived names would collide (`POST/GET /webhooks`, `GET/DELETE /webhooks/{id}` all derive to `webhooks`). The parser (`parseOpenApi`, `deriveToolName`) is now exported from the package root. diff --git a/.changeset/many-webhooks-crud.md b/.changeset/many-webhooks-crud.md new file mode 100644 index 0000000..512e3b2 --- /dev/null +++ b/.changeset/many-webhooks-crud.md @@ -0,0 +1,5 @@ +--- +'@taskade/mcp-server': minor +--- + +Four new signed-webhook management tools from Taskade API v2 (upstream v6.213.0 "Signed Webhooks"): `createWebhook`, `listWebhooks`, `getWebhook`, `deleteWebhook` — 62 → 66 tools. `createWebhook`'s description warns that the HMAC signing secret is returned exactly once and must be stored securely. The legacy unsigned `subscribeWebhook`/`unsubscribeWebhook` remain available but are deprecated upstream. diff --git a/.changeset/wild-hints-complete.md b/.changeset/wild-hints-complete.md new file mode 100644 index 0000000..4da58b3 --- /dev/null +++ b/.changeset/wild-hints-complete.md @@ -0,0 +1,6 @@ +--- +'@taskade/mcp-openapi-codegen': patch +'@taskade/mcp-server': patch +--- + +Generated tools now carry the full MCP annotation set: derived idempotentHint and openWorldHint:false alongside readOnly/destructive hints; per-action overrides supported. diff --git a/README.md b/README.md index 9673b51..fd7ad90 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ [![Add to Cursor](https://img.shields.io/badge/Add_to-Cursor-0098FF?style=flat-square)](cursor://anysphere.cursor-deeplink/mcp/install?name=taskade&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0YXNrYWRlL21jcC1zZXJ2ZXIiXSwiZW52Ijp7IlRBU0tBREVfQVBJX0tFWSI6InlvdXItYXBpLWtleS1oZXJlIn19) [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-007ACC?style=flat-square&logo=visualstudiocode&logoColor=white)](vscode:mcp/install?%7B%22name%22%3A%22taskade%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40taskade%2Fmcp-server%22%5D%2C%22env%22%3A%7B%22TASKADE_API_KEY%22%3A%22%24%7Binput%3Ataskade_api_key%7D%22%7D%7D) -**62 tools** for workspaces, projects, tasks, AI agents, agent chat, webhooks, knowledge bases, templates, media, and sharing — all from your AI client. +**66 tools** for workspaces, projects, tasks, AI agents, agent chat, webhooks, knowledge bases, templates, media, and sharing — all from your AI client. @@ -26,7 +26,7 @@ - [Demo](#demo) - [Quick Start](#quick-start) -- [Tools (62)](#tools-62) +- [Tools (66)](#tools-66) - [Why Taskade MCP?](#why-taskade-mcp) - [Agent Recipes](#agent-recipes) - [Use Cases](#use-cases) @@ -169,7 +169,7 @@ The server starts at `http://localhost:3000` (configure with `PORT` env var). Co --- -## Tools (62) +## Tools (66) ### Workspaces @@ -274,8 +274,14 @@ Capabilities the v1 API doesn't have: hold a live conversation with an AI agent, | `promptAgent` | Send a message to an AI agent and get its reply | | `listConversations` | List an agent's conversations | | `getConversation` | Get a conversation's messages | -| `subscribeWebhook` | Subscribe to real-time Taskade event webhooks | -| `unsubscribeWebhook` | Remove a webhook subscription | +| `createWebhook` | Register a signed (HMAC) webhook for one or more events | +| `listWebhooks` | List your registered signed webhooks | +| `getWebhook` | Get a signed webhook by id | +| `deleteWebhook` | Delete a signed webhook | +| `subscribeWebhook` | Subscribe to event webhooks (legacy, unsigned — prefer `createWebhook`) | +| `unsubscribeWebhook` | Remove a legacy webhook subscription | + +> **Warning:** `createWebhook` returns the HMAC signing secret exactly **once** — it cannot be retrieved again (not even via `getWebhook`). Store it securely before doing anything else; you need it to verify the signatures on incoming deliveries. --- @@ -293,7 +299,7 @@ Taskade MCP gives your AI assistant **access to your workspace** — projects, t ↓ ┌──────────────────────────────────┐ │ Taskade MCP Server │ - │ (62 tools, 8 categories) │ + │ (66 tools, 8 categories) │ └──────────────────────────────────┘ ↓ ↓ ↓ folderCreateAgent agentKnowledge agentPublicAccess @@ -320,7 +326,7 @@ Taskade MCP gives your AI assistant **access to your workspace** — projects, t ### Why Taskade MCP Over Other MCP Servers? -Taskade is the only MCP server that includes **AI agent management** (create, train, deploy agents), **knowledge base training** (attach docs, projects, media), and **OpenAPI codegen** (generate MCP tools from any API spec). 62 tools across 8 categories. +Taskade is the only MCP server that includes **AI agent management** (create, train, deploy agents), **knowledge base training** (attach docs, projects, media), and **OpenAPI codegen** (generate MCP tools from any API spec). 66 tools across 8 categories. --- diff --git a/packages/openapi-codegen/src/codegen.test.ts b/packages/openapi-codegen/src/codegen.test.ts new file mode 100644 index 0000000..21f29d8 --- /dev/null +++ b/packages/openapi-codegen/src/codegen.test.ts @@ -0,0 +1,115 @@ +import { OpenAPIV3 } from 'openapi-types'; +import { describe, expect, it } from 'vitest'; + +import { codegen } from './codegen'; + +const document = { + openapi: '3.0.0', + info: { title: 'Tiny API', version: '1.0.0' }, + paths: { + '/things': { + get: { operationId: 'thingList', description: 'List things', responses: {} }, + post: { operationId: 'thingCreate', description: 'Create a thing', responses: {} }, + }, + '/things/{thingId}': { + put: { operationId: 'thingUpdate', description: 'Update a thing', responses: {} }, + delete: { operationId: 'thingDelete', description: 'Delete a thing', responses: {} }, + }, + }, +} as OpenAPIV3.Document; + +/** + * Extracts the annotation hints for a named tool out of the generated + * (prettier-formatted) source. + */ +const hintsFor = (output: string, toolName: string) => { + const chunk = output + .split('server.tool(') + .find((part) => part.trimStart().startsWith(`"${toolName}"`)); + expect(chunk, `generated output contains tool ${toolName}`).toBeDefined(); + + const hints: Record = {}; + for (const key of ['readOnlyHint', 'destructiveHint', 'idempotentHint', 'openWorldHint']) { + const match = chunk?.match(new RegExp(`${key}:\\s*(true|false)`)); + expect(match, `${toolName} carries ${key}`).toBeTruthy(); + hints[key] = match?.[1] === 'true'; + } + return hints; +}; + +describe('codegen derived annotations', () => { + it('derives the full MCP hint set from the HTTP method', async () => { + const output = await codegen({ document }); + + expect(hintsFor(output, 'thingList')).toEqual({ + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + }); + expect(hintsFor(output, 'thingCreate')).toEqual({ + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false, + }); + expect(hintsFor(output, 'thingUpdate')).toEqual({ + readOnlyHint: false, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + }); + expect(hintsFor(output, 'thingDelete')).toEqual({ + readOnlyHint: false, + destructiveHint: true, + idempotentHint: true, + openWorldHint: false, + }); + }); + + it('lets a per-action config override the LLM-visible description (spec text loses)', async () => { + // Pins the mechanism used to fix misleading upstream descriptions (e.g. v2's + // getWebhook/deleteWebhook telling callers to pre-URL-encode the id while the + // runtime already encodes path params). + const output = await codegen({ + document, + actions: { + thingDelete: { description: 'Delete a thing by raw id — do NOT URL-encode it.' }, + }, + }); + + const chunkFor = (toolName: string) => + output.split('server.tool(').find((part) => part.trimStart().startsWith(`"${toolName}"`)); + + // Overridden tool carries the override, not the spec description. + expect(chunkFor('thingDelete')).toContain('Delete a thing by raw id — do NOT URL-encode it.'); + expect(chunkFor('thingDelete')).not.toContain('"Delete a thing"'); + // Tools without an override keep the spec description. + expect(chunkFor('thingList')).toContain('"List things"'); + }); + + it('lets a per-action config override any derived hint, including to false', async () => { + const output = await codegen({ + document, + actions: { + // A POST that is actually idempotent (e.g. taskComplete-style actions). + thingCreate: { idempotentHint: true }, + // An explicit `false` override must beat a derived `true`. + thingDelete: { destructiveHint: false }, + }, + }); + + expect(hintsFor(output, 'thingCreate')).toEqual({ + readOnlyHint: false, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + }); + expect(hintsFor(output, 'thingDelete')).toEqual({ + readOnlyHint: false, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + }); + }); +}); diff --git a/packages/openapi-codegen/src/codegen.ts b/packages/openapi-codegen/src/codegen.ts index c94140a..d6a7409 100644 --- a/packages/openapi-codegen/src/codegen.ts +++ b/packages/openapi-codegen/src/codegen.ts @@ -4,7 +4,7 @@ import { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from 'openapi-types'; import path from 'path'; import prettier from 'prettier'; -import { ParsedTool, parseOpenApi } from './parser'; +import { ParsedTool, parseOpenApi, ParseOpenApiOpts } from './parser'; type IsActionsEnabledOpt = Array | ((actionName: string) => boolean); @@ -12,8 +12,24 @@ type ActionConfig = Partial<{ title: string; description: string; normalizer: (args: any) => any; + /** + * Explicit MCP annotation overrides. When set, they beat the values derived + * from the HTTP method (e.g. a POST action that is actually idempotent can + * set `idempotentHint: true`). + */ + readOnlyHint: boolean; + destructiveHint: boolean; + idempotentHint: boolean; + openWorldHint: boolean; }>; +const ANNOTATION_HINT_KEYS = [ + 'readOnlyHint', + 'destructiveHint', + 'idempotentHint', + 'openWorldHint', +] as const; + const isActionsEnabled = (isActionsEnabledOpt: IsActionsEnabledOpt, actionName: string) => { if (typeof isActionsEnabledOpt === 'function') { return isActionsEnabledOpt(actionName); @@ -48,13 +64,20 @@ type CodegenOpts = { * the first without an export-name collision. */ exportName?: string; + /** + * Explicit tool-name overrides keyed by `" "` — see + * `ParseOpenApiOpts.nameOverrides`. Use for operations without `operationId` + * whose path-derived names would collide (REST siblings like `GET /webhooks` + * and `GET /webhooks/{id}`). + */ + nameOverrides?: ParseOpenApiOpts['nameOverrides']; }; export const codegen = async (opts: CodegenOpts) => { const { document, path: outputPath } = opts; const exportName = opts.exportName ?? 'setupTools'; - const tools = parseOpenApi(document.paths ?? {}); + const tools = parseOpenApi(document.paths ?? {}, { nameOverrides: opts.nameOverrides }); const runtime = fs.readFileSync(path.join(import.meta.dirname, 'runtime.ts'), 'utf8'); @@ -81,23 +104,39 @@ export const codegen = async (opts: CodegenOpts) => { } // Derive MCP tool annotations from the HTTP method: GET/HEAD are read-only, - // DELETE is destructive. A human-friendly title can be supplied via opts.actions. + // DELETE is destructive, GET/HEAD/PUT/DELETE are idempotent per HTTP + // semantics (POST is not). openWorldHint is always false: this server only + // talks to the Taskade API — a closed world. A human-friendly title and + // explicit hint overrides can be supplied via opts.actions. const method = tool.method.toUpperCase(); const annotations: Record = { readOnlyHint: method === 'GET' || method === 'HEAD', destructiveHint: method === 'DELETE', + idempotentHint: ['GET', 'HEAD', 'PUT', 'DELETE'].includes(method), + openWorldHint: false, }; - const actionTitle = opts.actions?.[tool.name]?.title; + const actionConfig = opts.actions?.[tool.name]; + + // Explicit per-action overrides beat derived values. Undefined-checked so + // an explicit `false` override wins too. + for (const hint of ANNOTATION_HINT_KEYS) { + const override = actionConfig?.[hint]; + if (override !== undefined) { + annotations[hint] = override; + } + } + + const actionTitle = actionConfig?.title; if (actionTitle) { annotations.title = actionTitle; } - const description = opts.actions?.[tool.name]?.description ?? tool.description; + const description = actionConfig?.description ?? tool.description; const toolArgs = [`"${tool.name}"`, `"${description}"`, generateToolInputFromParsedTool(tool)]; - // annotations always carry read-only/destructive hints, so always include them + // annotations always carry the derived hint set, so always include them toolArgs.push(JSON.stringify(annotations)); toolArgs.push(`async (args) => { diff --git a/packages/openapi-codegen/src/index.ts b/packages/openapi-codegen/src/index.ts index 646541b..94662b9 100644 --- a/packages/openapi-codegen/src/index.ts +++ b/packages/openapi-codegen/src/index.ts @@ -1 +1,2 @@ export * from './codegen'; +export * from './parser'; diff --git a/packages/openapi-codegen/src/parser.test.ts b/packages/openapi-codegen/src/parser.test.ts index b490c12..d224019 100644 --- a/packages/openapi-codegen/src/parser.test.ts +++ b/packages/openapi-codegen/src/parser.test.ts @@ -23,6 +23,15 @@ describe('deriveToolName', () => { expect(deriveToolName('get', '/')).toBe('get'); expect(deriveToolName('POST', '/{id}')).toBe('post'); }); + + it('collides for REST siblings: {param} segments dropped, method ignored (the nameOverrides hazard)', () => { + // Pins the hazard that motivates nameOverrides: without an override, all four + // signed-webhook CRUD ops would emit the same tool name. + expect(deriveToolName('post', '/webhooks')).toBe('webhooks'); + expect(deriveToolName('get', '/webhooks')).toBe('webhooks'); + expect(deriveToolName('get', '/webhooks/{id}')).toBe('webhooks'); + expect(deriveToolName('delete', '/webhooks/{id}')).toBe('webhooks'); + }); }); describe('parseOpenApi name resolution', () => { @@ -87,4 +96,60 @@ describe('parseOpenApi name resolution', () => { ]); expect(tools[0].inputSchema.required).toEqual(['spaceId', 'agentId', 'prompt']); }); + + it('applies nameOverrides keyed by " " to disambiguate REST siblings', () => { + const tools = parseOpenApi( + { + '/webhooks': { + post: { summary: 'Register a signed webhook', responses: {} }, + get: { summary: 'List signed webhooks', responses: {} }, + }, + '/webhooks/{id}': { + get: { summary: 'Get a signed webhook', responses: {} }, + delete: { summary: 'Delete a signed webhook', responses: {} }, + }, + } as never, + { + nameOverrides: { + 'post /webhooks': 'createWebhook', + 'get /webhooks': 'listWebhooks', + 'get /webhooks/{id}': 'getWebhook', + 'delete /webhooks/{id}': 'deleteWebhook', + }, + }, + ); + expect(tools.map((t) => t.name).sort()).toEqual([ + 'createWebhook', + 'deleteWebhook', + 'getWebhook', + 'listWebhooks', + ]); + }); + + it('without nameOverrides, REST siblings all fall back to the same derived name (collision pinned)', () => { + const tools = parseOpenApi({ + '/webhooks': { + post: { responses: {} }, + get: { responses: {} }, + }, + '/webhooks/{id}': { + get: { responses: {} }, + delete: { responses: {} }, + }, + } as never); + expect(tools.map((t) => t.name)).toEqual(['webhooks', 'webhooks', 'webhooks', 'webhooks']); + }); + + it('an explicit override beats operationId; unkeyed operations are unaffected', () => { + const tools = parseOpenApi( + { + '/projects': { + post: { operationId: 'projectCreate', responses: {} }, + get: { operationId: 'projectsList', responses: {} }, + }, + } as never, + { nameOverrides: { 'post /projects': 'createProject' } }, + ); + expect(tools.map((t) => t.name).sort()).toEqual(['createProject', 'projectsList']); + }); }); diff --git a/packages/openapi-codegen/src/parser.ts b/packages/openapi-codegen/src/parser.ts index b614938..219c83f 100644 --- a/packages/openapi-codegen/src/parser.ts +++ b/packages/openapi-codegen/src/parser.ts @@ -21,13 +21,28 @@ export type ParsedTool = { outputSchema: IJsonSchema; }; +export type ParseOpenApiOpts = { + /** + * Explicit tool-name overrides keyed by `" "`, e.g. + * `{ 'post /webhooks': 'createWebhook' }`. An override wins over both + * `operationId` and the path-derived fallback. Needed for REST-shaped specs + * without `operationId`, where `deriveToolName` drops `{param}` segments and + * ignores the HTTP method — all four of `POST /webhooks`, `GET /webhooks`, + * `GET /webhooks/{id}` and `DELETE /webhooks/{id}` would otherwise collide + * as `webhooks`. + */ + nameOverrides?: Record; +}; + /** * Derive a stable camelCase tool name from an operation's path when the spec omits * `operationId` — e.g. Taskade API v2's flat RPC routes (`POST /promptAgent`). Path * params (`{id}`) are dropped and remaining segments are camelCased * (`/media/{mediaId}/content` → `mediaContent`). Falls back to the HTTP method for a * root or param-only path (`/`, `/{id}`). Specs that DO provide `operationId` (e.g. - * Taskade v1) are unaffected. + * Taskade v1) are unaffected. NOTE: because `{param}` segments are dropped and the + * method is ignored, sibling REST routes (`GET /webhooks` vs `GET /webhooks/{id}`) + * collide — disambiguate those via `ParseOpenApiOpts.nameOverrides`. */ export const deriveToolName = (method: string, path: string): string => { const words = path @@ -52,6 +67,7 @@ export const deriveToolName = (method: string, path: string): string => { export const parseOpenApi = ( paths: OpenAPIV3_1.PathsObject | OpenAPIV3.PathsObject | OpenAPIV2.PathsObject, + opts: ParseOpenApiOpts = {}, ): ParsedTool[] => { const tools: ParsedTool[] = []; @@ -166,7 +182,10 @@ export const parseOpenApi = ( } tools.push({ - name: operation.operationId ?? deriveToolName(method, path), + name: + opts.nameOverrides?.[`${method.toLowerCase()} ${path}`] ?? + operation.operationId ?? + deriveToolName(method, path), method: method, path: path, description: operation.description ?? operation.summary ?? '', diff --git a/packages/server/scripts/gen-taskade-mcp-tools-v2.ts b/packages/server/scripts/gen-taskade-mcp-tools-v2.ts index 7d7758d..02543a6 100644 --- a/packages/server/scripts/gen-taskade-mcp-tools-v2.ts +++ b/packages/server/scripts/gen-taskade-mcp-tools-v2.ts @@ -1,12 +1,41 @@ import { dereference } from '@readme/openapi-parser'; -import { codegen } from '@taskade/mcp-openapi-codegen'; +import { codegen, deriveToolName } from '@taskade/mcp-openapi-codegen'; import fs from 'fs'; -import { ENABLED_TASKADE_V2_ACTIONS, HUMANIZED_TASKADE_V2_ACTIONS } from '../src/constants.v2'; +import { + ENABLED_TASKADE_V2_ACTIONS, + HUMANIZED_TASKADE_V2_ACTIONS, + TASKADE_V2_ACTION_DESCRIPTIONS, + TaskadeV2Action, +} from '../src/constants.v2'; -// Taskade API v2 is a flat RPC API whose operations omit `operationId`; the codegen -// derives tool names from the path (e.g. POST /promptAgent -> "promptAgent"). -const deriveName = (p: string) => p.replace(/^\//, '').split('/')[0]; +// Taskade API v2 is mostly a flat RPC API whose operations omit `operationId`; the +// codegen derives tool names from the path (e.g. POST /promptAgent -> "promptAgent"). +// The signed-webhook CRUD (upstream v6.213.0) is the exception: REST-shaped routes +// where path-derived naming would collide (POST/GET /webhooks and GET/DELETE +// /webhooks/{id} all derive to "webhooks"), so those get explicit name overrides, +// keyed by " ". +const NAME_OVERRIDES: Record = { + 'post /webhooks': 'createWebhook', + 'get /webhooks': 'listWebhooks', + 'get /webhooks/{id}': 'getWebhook', + 'delete /webhooks/{id}': 'deleteWebhook', +}; + +const HTTP_METHODS = new Set(['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace']); + +// Tool names a path item will produce, mirroring the codegen's resolution order +// (override -> operationId -> derived) so the prune allow-list matcher below cannot +// drift from the names the codegen actually emits. +const toolNamesForPath = (p: string, item: object): string[] => + Object.entries(item) + .filter(([m]) => HTTP_METHODS.has(m.toLowerCase())) + .map( + ([m, op]) => + NAME_OVERRIDES[`${m.toLowerCase()} ${p}`] ?? + (op as { operationId?: string }).operationId ?? + deriveToolName(m, p), + ); // Why prune before dereferencing: the live v2 spec currently has a broken self-$ref // inside components.schemas.Field (data.fillerConfig...sourceRef) that makes a full @@ -19,9 +48,10 @@ const pruneToEnabled = (doc: any) => { const paths: Record = {}; const matched = new Set(); for (const [p, ms] of Object.entries(doc.paths ?? {})) { - if (enabled.has(deriveName(p))) { + const enabledNames = toolNamesForPath(p, ms as object).filter((name) => enabled.has(name)); + if (enabledNames.length > 0) { paths[p] = ms; - matched.add(deriveName(p)); + enabledNames.forEach((name) => matched.add(name)); } } @@ -79,7 +109,10 @@ try { } const actions = Object.fromEntries( - Object.entries(HUMANIZED_TASKADE_V2_ACTIONS).map(([name, title]) => [name, { title }]), + Object.entries(HUMANIZED_TASKADE_V2_ACTIONS).map(([name, title]) => [ + name, + { title, description: TASKADE_V2_ACTION_DESCRIPTIONS[name as TaskadeV2Action] }, + ]), ); await codegen({ @@ -87,5 +120,6 @@ await codegen({ document: document as never, isActionsEnabled: [...ENABLED_TASKADE_V2_ACTIONS], actions, + nameOverrides: NAME_OVERRIDES, exportName: 'setupToolsV2', }); diff --git a/packages/server/server.json b/packages/server/server.json index 1fa07cb..54bdefa 100644 --- a/packages/server/server.json +++ b/packages/server/server.json @@ -1,7 +1,7 @@ { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.taskade/mcp-server", - "description": "Connect Taskade to any AI assistant — 62 tools: projects, tasks, agents, agent chat, webhooks.", + "description": "Connect Taskade to any AI assistant — 66 tools: projects, tasks, agents, agent chat, webhooks.", "repository": { "url": "https://github.com/taskade/mcp.git", "source": "github" diff --git a/packages/server/src/constants.v2.ts b/packages/server/src/constants.v2.ts index 3c735e1..706505c 100644 --- a/packages/server/src/constants.v2.ts +++ b/packages/server/src/constants.v2.ts @@ -14,6 +14,13 @@ export const ENABLED_TASKADE_V2_ACTIONS = [ // Real-time events 'subscribeWebhook', 'unsubscribeWebhook', + // Signed webhooks (HMAC) — upstream v6.213.0; these ops omit operationId AND + // share paths (/webhooks, /webhooks/{id}), so their names come from the + // nameOverrides map in scripts/gen-taskade-mcp-tools-v2.ts, not the path. + 'createWebhook', + 'listWebhooks', + 'getWebhook', + 'deleteWebhook', ] as const; export type TaskadeV2Action = (typeof ENABLED_TASKADE_V2_ACTIONS)[number]; @@ -26,4 +33,28 @@ export const HUMANIZED_TASKADE_V2_ACTIONS: Record = { getConversation: 'Get Agent Conversation', subscribeWebhook: 'Subscribe to a Webhook', unsubscribeWebhook: 'Unsubscribe from a Webhook', + createWebhook: 'Create a Signed Webhook', + listWebhooks: 'List Signed Webhooks', + getWebhook: 'Get a Signed Webhook', + deleteWebhook: 'Delete a Signed Webhook', +}; + +// Per-action description overrides (fed to the codegen's ActionConfig.description). +// Only needed where the spec's summary omits something the model must know — or, +// for getWebhook/deleteWebhook, actively misleads: the upstream spec says the id is +// the webhook's "URL-encoded target URL", but the generated runtime already applies +// encodeURIComponent to every path param, so a caller that pre-encodes double-encodes +// the id and the lookup fails. The override tells the model to pass the RAW URL. +export const TASKADE_V2_ACTION_DESCRIPTIONS: Partial> = { + createWebhook: + 'Register a signed outbound webhook for one or more Taskade events. ' + + 'The response includes the HMAC signing secret exactly ONCE — it cannot be ' + + 'retrieved again later, so store it securely (e.g. a secret manager) before ' + + 'doing anything else.', + getWebhook: + 'Get a webhook subscription by id. Pass the webhook’s raw target URL as `id` ' + + '— do NOT URL-encode it; encoding is applied automatically.', + deleteWebhook: + 'Delete a webhook subscription by id. Pass the webhook’s raw target URL as `id` ' + + '— do NOT URL-encode it; encoding is applied automatically.', }; diff --git a/packages/server/src/tools.generated.ts b/packages/server/src/tools.generated.ts index 4c57093..13e2350 100644 --- a/packages/server/src/tools.generated.ts +++ b/packages/server/src/tools.generated.ts @@ -223,6 +223,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Create Workspace Project', }, async (args) => { @@ -240,7 +242,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'workspacesGet', 'Get all workspaces for a user', z.object({}).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get All Workspaces' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get All Workspaces', + }, async (args) => { return await config.executeToolCall({ name: 'workspacesGet', @@ -259,6 +267,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Workspace Folders', }, async (args) => { @@ -279,6 +289,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Project Details', }, async (args) => { @@ -296,7 +308,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'projectComplete', 'Mark the project as completed', z.object({ projectId: z.string() }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Complete Project' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false, + title: 'Complete Project', + }, async (args) => { return await config.executeToolCall({ name: 'projectComplete', @@ -312,7 +330,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'projectRestore', 'Restore project', z.object({ projectId: z.string() }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Restore Project' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false, + title: 'Restore Project', + }, async (args) => { return await config.executeToolCall({ name: 'projectRestore', @@ -332,7 +356,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts projectTitle: z.string().min(1).optional(), projectId: z.string(), }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Copy Project' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false, + title: 'Copy Project', + }, async (args) => { return await config.executeToolCall({ name: 'projectCopy', @@ -355,6 +385,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Create New Project', }, async (args) => { @@ -375,6 +407,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Create Project from Template', }, async (args) => { @@ -399,6 +433,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Project Members', }, async (args) => { @@ -416,7 +452,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'projectFieldsGet', 'Get all fields for a project', z.object({ projectId: z.string() }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Project Fields' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Project Fields', + }, async (args) => { return await config.executeToolCall({ name: 'projectFieldsGet', @@ -435,6 +477,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Project Share Link', }, async (args) => { @@ -455,6 +499,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Enable Project Share Link', }, async (args) => { @@ -477,7 +523,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts after: z.string().uuid().optional(), before: z.string().uuid().optional(), }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Project Blocks' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Project Blocks', + }, async (args) => { return await config.executeToolCall({ name: 'projectBlocksGet', @@ -498,7 +550,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts after: z.string().uuid().optional(), before: z.string().uuid().optional(), }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Project Tasks' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Project Tasks', + }, async (args) => { return await config.executeToolCall({ name: 'projectTasksGet', @@ -514,7 +572,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'taskGet', 'Get task with id', z.object({ projectId: z.string(), taskId: z.string() }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Task Details' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Task Details', + }, async (args) => { return await config.executeToolCall({ name: 'taskGet', @@ -530,7 +594,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'taskDelete', 'Delete a task in a project', z.object({ projectId: z.string(), taskId: z.string() }).shape, - { readOnlyHint: false, destructiveHint: true, title: 'Delete Task' }, + { + readOnlyHint: false, + destructiveHint: true, + idempotentHint: true, + openWorldHint: false, + title: 'Delete Task', + }, async (args) => { return await config.executeToolCall({ name: 'taskDelete', @@ -551,7 +621,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts projectId: z.string(), taskId: z.string(), }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Update Task' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Update Task', + }, async (args) => { return await config.executeToolCall({ name: 'taskPut', @@ -567,7 +643,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'taskComplete', 'Complete a task in a project', z.object({ projectId: z.string(), taskId: z.string() }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Complete Task' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false, + title: 'Complete Task', + }, async (args) => { return await config.executeToolCall({ name: 'taskComplete', @@ -586,6 +668,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Mark Task Incomplete', }, async (args) => { @@ -627,7 +711,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts .max(20), projectId: z.string(), }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Create New Task' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false, + title: 'Create New Task', + }, async (args) => { return await config.executeToolCall({ name: 'taskCreate', @@ -652,7 +742,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts projectId: z.string(), taskId: z.string(), }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Move Task' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Move Task', + }, async (args) => { return await config.executeToolCall({ name: 'taskMove', @@ -668,7 +764,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'taskAssigneesGet', 'Get the assignees of a task', z.object({ projectId: z.string(), taskId: z.string() }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Task Assignees' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Task Assignees', + }, async (args) => { return await config.executeToolCall({ name: 'taskAssigneesGet', @@ -691,6 +793,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Update Task Assignees', }, async (args) => { @@ -715,6 +819,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: true, + idempotentHint: true, + openWorldHint: false, title: 'Remove Task Assignees', }, async (args) => { @@ -732,7 +838,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'taskGetDate', 'Get the date of a task', z.object({ projectId: z.string(), taskId: z.string() }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Task Date' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Task Date', + }, async (args) => { return await config.executeToolCall({ name: 'taskGetDate', @@ -748,7 +860,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'taskDeleteDate', 'Delete date of a task', z.object({ projectId: z.string(), taskId: z.string() }).shape, - { readOnlyHint: false, destructiveHint: true, title: 'Remove Task Date' }, + { + readOnlyHint: false, + destructiveHint: true, + idempotentHint: true, + openWorldHint: false, + title: 'Remove Task Date', + }, async (args) => { return await config.executeToolCall({ name: 'taskDeleteDate', @@ -792,7 +910,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts projectId: z.string(), taskId: z.string(), }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Set Task Date' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Set Task Date', + }, async (args) => { return await config.executeToolCall({ name: 'taskPutDate', @@ -808,7 +932,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'taskNoteGet', 'Get the note of a task', z.object({ projectId: z.string(), taskId: z.string() }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Task Note' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Task Note', + }, async (args) => { return await config.executeToolCall({ name: 'taskNoteGet', @@ -829,7 +959,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts projectId: z.string(), taskId: z.string(), }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Update Task Note' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Update Task Note', + }, async (args) => { return await config.executeToolCall({ name: 'taskNotePut', @@ -845,7 +981,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'taskNoteDelete', 'Delete the note of a task', z.object({ projectId: z.string(), taskId: z.string() }).shape, - { readOnlyHint: false, destructiveHint: true, title: 'Delete Task Note' }, + { + readOnlyHint: false, + destructiveHint: true, + idempotentHint: true, + openWorldHint: false, + title: 'Delete Task Note', + }, async (args) => { return await config.executeToolCall({ name: 'taskNoteDelete', @@ -864,6 +1006,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get All Task Field Values', }, async (args) => { @@ -884,6 +1028,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Task Field Value', }, async (args) => { @@ -904,6 +1050,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: true, + idempotentHint: true, + openWorldHint: false, title: 'Delete Task Field Value', }, async (args) => { @@ -929,6 +1077,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Set Task Field Value', }, async (args) => { @@ -949,6 +1099,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Projects in Folder', }, async (args) => { @@ -969,6 +1121,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Generate AI Agent from Prompt', }, async (args) => { @@ -1162,7 +1316,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts ]), folderId: z.string(), }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Create AI Agent' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false, + title: 'Create AI Agent', + }, async (args) => { return await config.executeToolCall({ name: 'folderCreateAgent', @@ -1185,6 +1345,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Agents in Folder', }, async (args) => { @@ -1209,6 +1371,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Media in Folder', }, async (args) => { @@ -1233,6 +1397,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Project Templates', }, async (args) => { @@ -1254,7 +1420,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts page: z.number().default(1), sort: z.enum(['viewed-asc', 'viewed-desc']).default('viewed-desc'), }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get My Projects' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get My Projects', + }, async (args) => { return await config.executeToolCall({ name: 'meProjectsGet', @@ -1273,6 +1445,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Enable Agent Public Access', }, async (args) => { @@ -1290,7 +1464,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'agentGet', 'Get agent with id', z.object({ agentId: z.string() }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Agent Details' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Agent Details', + }, async (args) => { return await config.executeToolCall({ name: 'agentGet', @@ -1306,7 +1486,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'deleteAgent', 'Delete an agent', z.object({ agentId: z.string() }).shape, - { readOnlyHint: false, destructiveHint: true, title: 'Delete Agent' }, + { + readOnlyHint: false, + destructiveHint: true, + idempotentHint: true, + openWorldHint: false, + title: 'Delete Agent', + }, async (args) => { return await config.executeToolCall({ name: 'deleteAgent', @@ -1402,7 +1588,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts .optional(), agentId: z.string(), }).shape, - { readOnlyHint: false, destructiveHint: false, title: 'Update Agent' }, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false, + title: 'Update Agent', + }, async (args) => { return await config.executeToolCall({ name: 'agentUpdate', @@ -1418,7 +1610,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'agentPublicGet', 'Get public agent', z.object({ agentId: z.string() }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Public Agent' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Public Agent', + }, async (args) => { return await config.executeToolCall({ name: 'agentPublicGet', @@ -1455,6 +1653,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Update Public Agent', }, async (args) => { @@ -1475,6 +1675,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Add Knowledge Project to Agent', }, async (args) => { @@ -1495,6 +1697,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Add Knowledge Media to Agent', }, async (args) => { @@ -1515,6 +1719,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: true, + idempotentHint: true, + openWorldHint: false, title: 'Remove Knowledge Project from Agent', }, async (args) => { @@ -1535,6 +1741,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: false, destructiveHint: true, + idempotentHint: true, + openWorldHint: false, title: 'Remove Knowledge Media from Agent', }, async (args) => { @@ -1559,6 +1767,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Agent Conversations', }, async (args) => { @@ -1579,6 +1789,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Agent Conversation', }, async (args) => { @@ -1596,7 +1808,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'mediaGet', 'Get media with id', z.object({ mediaId: z.string() }).shape, - { readOnlyHint: true, destructiveHint: false, title: 'Get Media Details' }, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get Media Details', + }, async (args) => { return await config.executeToolCall({ name: 'mediaGet', @@ -1612,7 +1830,13 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts 'mediaDelete', 'Delete a media', z.object({ mediaId: z.string() }).shape, - { readOnlyHint: false, destructiveHint: true, title: 'Delete Media' }, + { + readOnlyHint: false, + destructiveHint: true, + idempotentHint: true, + openWorldHint: false, + title: 'Delete Media', + }, async (args) => { return await config.executeToolCall({ name: 'mediaDelete', @@ -1631,6 +1855,8 @@ export const setupTools = (server: McpServer, opts: OpenAPIToolRuntimeConfigOpts { readOnlyHint: true, destructiveHint: false, + idempotentHint: true, + openWorldHint: false, title: 'Get Public Agent by Public ID', }, async (args) => { diff --git a/packages/server/src/tools.v2.generated.ts b/packages/server/src/tools.v2.generated.ts index f406083..fff5e1d 100644 --- a/packages/server/src/tools.v2.generated.ts +++ b/packages/server/src/tools.v2.generated.ts @@ -223,6 +223,8 @@ export const setupToolsV2 = (server: McpServer, opts: OpenAPIToolRuntimeConfigOp { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Chat with an AI Agent', }, async (args) => { @@ -247,6 +249,8 @@ export const setupToolsV2 = (server: McpServer, opts: OpenAPIToolRuntimeConfigOp { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'List Agent Conversations', }, async (args) => { @@ -263,10 +267,16 @@ export const setupToolsV2 = (server: McpServer, opts: OpenAPIToolRuntimeConfigOp server.tool( 'getConversation', 'Get agent conversation by ID', - z.object({ agentId: z.string().min(1), convoId: z.string().min(1) }).shape, + z.object({ + agentId: z.string().min(1), + convoId: z.string().min(1), + includeTranscript: z.boolean().default(false), + }).shape, { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Get Agent Conversation', }, async (args) => { @@ -282,7 +292,7 @@ export const setupToolsV2 = (server: McpServer, opts: OpenAPIToolRuntimeConfigOp ); server.tool( 'subscribeWebhook', - 'Subscribe to a webhook for a Taskade event', + '[Deprecated: use POST /webhooks] Subscribe to a webhook for a Taskade event (unsigned)', z.object({ targetUrl: z.string().url(), triggerType: z.enum([ @@ -297,6 +307,8 @@ export const setupToolsV2 = (server: McpServer, opts: OpenAPIToolRuntimeConfigOp { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Subscribe to a Webhook', }, async (args) => { @@ -312,11 +324,13 @@ export const setupToolsV2 = (server: McpServer, opts: OpenAPIToolRuntimeConfigOp ); server.tool( 'unsubscribeWebhook', - 'Remove a previously-created webhook subscription', + '[Deprecated: use DELETE /webhooks/:id] Remove a previously-created webhook subscription', z.object({ hookId: z.string().min(1) }).shape, { readOnlyHint: false, destructiveHint: false, + idempotentHint: false, + openWorldHint: false, title: 'Unsubscribe from a Webhook', }, async (args) => { @@ -330,4 +344,107 @@ export const setupToolsV2 = (server: McpServer, opts: OpenAPIToolRuntimeConfigOp }); }, ); + server.tool( + 'createWebhook', + 'Register a signed outbound webhook for one or more Taskade events. The response includes the HMAC signing secret exactly ONCE — it cannot be retrieved again later, so store it securely (e.g. a secret manager) before doing anything else.', + z.object({ + targetUrl: z.string().url(), + events: z + .array( + z.enum([ + 'task.due', + 'comment.created', + 'task.assigned', + 'project.created', + 'project.assigned', + 'project.joined', + ]), + ) + .min(1), + spaceIds: z.array(z.string().min(1)).max(100).default([]), + }).shape, + { + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false, + title: 'Create a Signed Webhook', + }, + async (args) => { + return await config.executeToolCall({ + name: 'createWebhook', + path: '/webhooks', + method: 'POST', + input: args, + pathParamKeys: [], + queryParamKeys: [], + }); + }, + ); + server.tool( + 'listWebhooks', + 'List your registered outbound webhooks', + z.object({}).shape, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'List Signed Webhooks', + }, + async (args) => { + return await config.executeToolCall({ + name: 'listWebhooks', + path: '/webhooks', + method: 'GET', + input: args, + pathParamKeys: [], + queryParamKeys: [], + }); + }, + ); + server.tool( + 'getWebhook', + 'Get a webhook subscription by id. Pass the webhook’s raw target URL as `id` — do NOT URL-encode it; encoding is applied automatically.', + z.object({ id: z.string().min(1) }).shape, + { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false, + title: 'Get a Signed Webhook', + }, + async (args) => { + return await config.executeToolCall({ + name: 'getWebhook', + path: '/webhooks/{id}', + method: 'GET', + input: args, + pathParamKeys: ['id'], + queryParamKeys: [], + }); + }, + ); + server.tool( + 'deleteWebhook', + 'Delete a webhook subscription by id. Pass the webhook’s raw target URL as `id` — do NOT URL-encode it; encoding is applied automatically.', + z.object({ id: z.string().min(1) }).shape, + { + readOnlyHint: false, + destructiveHint: true, + idempotentHint: true, + openWorldHint: false, + title: 'Delete a Signed Webhook', + }, + async (args) => { + return await config.executeToolCall({ + name: 'deleteWebhook', + path: '/webhooks/{id}', + method: 'DELETE', + input: args, + pathParamKeys: ['id'], + queryParamKeys: [], + }); + }, + ); }; diff --git a/packages/server/taskade-public.v2.json b/packages/server/taskade-public.v2.json index 7c21210..231459e 100644 --- a/packages/server/taskade-public.v2.json +++ b/packages/server/taskade-public.v2.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Taskade Public API (v2)","description":"Taskade Action API (v2, Beta) — RPC-style operations (POST /listSpaces, /promptAgent, …) returning an ok-discriminated envelope ({ ok: true, items | item, … } on success; { ok: false, code, message } on error). Adds agent capabilities v1 lacks; tasks are read-only in v2 — use the REST API v1 for full task CRUD.","version":"2.0.0-beta"},"components":{"securitySchemes":{"oAuthAuthorizationCode":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://www.taskade.com/oauth2/authorize","tokenUrl":"https://www.taskade.com/oauth2/token","scopes":{}}}},"personalAccessToken":{"type":"http","scheme":"bearer"}},"schemas":{"BundleInstallation":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the bundle installation."},"projectCount":{"type":"number","description":"Number of projects installed."},"flowCount":{"type":"number","description":"Number of automations installed."},"agentCount":{"type":"number","description":"Number of agents installed."},"templateCount":{"type":"number","description":"Number of templates installed."},"mediaCount":{"type":"number","description":"Number of media files installed."},"appCount":{"type":"number","description":"Number of apps installed."}},"required":["id","projectCount","flowCount","agentCount","templateCount","mediaCount","appCount"],"additionalProperties":false},"Project":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project. An alphanumeric string that is 16 characters long."},"name":{"type":"string","description":"The project’s name or title."}},"required":["id"],"additionalProperties":false},"ProjectShare":{"type":"object","properties":{"checkUrl":{"type":"string","format":"uri"},"editUrl":{"type":"string","format":"uri"},"viewUrl":{"type":"string","format":"uri"}},"required":["editUrl","viewUrl"],"additionalProperties":false,"description":"The share links of a project"},"ProjectTemplate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"Error":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"message":{"type":"string"},"code":{"type":"string"},"statusMessage":{"type":"string"}},"required":["ok","message","code","statusMessage"],"additionalProperties":false,"description":"Error description"},"Task":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"parentId":{"type":"string"},"completed":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false},"TaskNote":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false},"Date":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"ISO date format (YYYY-MM-DD), e.g. \"2021-12-31\""},"time":{"type":"string","pattern":"^(?:[0-1][0-9]|[2][0-3]):[0-5][0-9](?::[0-5][0-9])?$","nullable":true,"description":"Optional time component in 24-hour format (HH:MM:SS), e.g. \"15:30:45\". Can be null or omitted for date-only representations"},"timezone":{"type":"string","nullable":true,"description":"Optional timezone identifier (IANA timezone name), e.g. \"America/New_York\", \"Asia/Singapore\". Can be null or omitted for timezone-naive representations"}},"required":["date"],"additionalProperties":false},"SpaceAgent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"space_id":{"type":"string"},"data":{"type":"object","properties":{"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable name of the command in title case. This should probably be a verb."},"description":{"type":"string","nullable":true,"description":"Short summary for discovery (e.g. progressive disclosure / skill listing). The full instruction stays in `prompt`."},"prompt":{"type":"string","minLength":1,"description":"Tell the agent what this command will do. It should be positioned as a direct instruction to the agent. At least 30 words."},"id":{"type":"string","minLength":1,"description":"ID based on the name in snake case."},"mode":{"type":"string","enum":["default","plan-and-execute-v1","plan-and-execute-v2"],"default":"default"}},"required":["name","prompt","id"],"additionalProperties":false}},"description":{"type":"string","description":"Role and purpose of agent, positioned as a direct instruction to the agent. Example: \"You are a doctor that helps save lives.\". At least 100 words."},"tone":{"type":"string","enum":["authoritative","clinical","cold","confident","cynical","emotional","empathetic","formal","friendly","humourous","informal","ironic","optimistic","pessimistic","playful","sarcastic","serious","sympathetic","tentative","warm","creative","inspiring","casual"]},"avatar":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["emoji"]},"data":{"type":"object","properties":{"value":{"type":"string","description":"Pick the most suitable emoji for this agent."}},"required":["value"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}]},"knowledgeEnabled":{"type":"boolean"},"language":{"type":"string","description":"The language of the agent, e.g. en-US, zh-Hans"},"inputPlaceholder":{"type":"string","nullable":true}},"required":["commands"],"additionalProperties":false}},"required":["id","name","space_id","data"],"additionalProperties":false},"Media":{"type":"object","properties":{"id":{"type":"string"},"space_id":{"type":"string"},"kind":{"type":"string"}},"required":["id","space_id","kind"],"additionalProperties":false},"User":{"type":"object","properties":{"handle":{"type":"string"},"displayName":{"type":"string"}},"required":["handle"],"additionalProperties":false},"Field":{"type":"object","properties":{"id":{"type":"string"},"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Note"]},"fillerConfig":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string.translate"]},"sourceRef":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["field"]},"fieldPath":{"type":"string"}},"required":["type","fieldPath"],"additionalProperties":false}]},"targetLang":{"type":"string"}},"required":["type","sourceRef","targetLang"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["string.summarize"]},"sourceRef":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig/anyOf/0/properties/sourceRef"},"additionalInstructions":{"type":"string"}},"required":["type","sourceRef"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["string.extract"]},"sourceRef":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig/anyOf/0/properties/sourceRef"},"entity":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["email_address"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["first_name"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["last_name"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["phone_number"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["domain_name"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["link"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["date"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["time"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["year"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"instructions":{"type":"string"}},"required":["type","instructions"],"additionalProperties":false}]}},"required":["type","sourceRef","entity"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["string.custom"]},"instructions":{"type":"string"}},"required":["type","instructions"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Select.pick"]},"sourceRef":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig/anyOf/0/properties/sourceRef"},"permittedOptionIds":{"type":"array","items":{"type":"string"}},"additionalInstructions":{"type":"string"}},"required":["type","sourceRef","permittedOptionIds"],"additionalProperties":false}]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Timestamp"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["TimestampAt"]},"displayName":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["TimestampAuthor"]},"displayName":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"displayName":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["Select"]},"options":{"type":"object","additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"string"},"description":{"type":"string"},"color":{"type":"string"}},"required":["id","name","rank"],"additionalProperties":false}},"defaultOption":{"type":"string"},"fillerConfig":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig"}},"required":["displayName","type","options"],"additionalProperties":false},{"type":"object","properties":{"displayName":{"type":"string","minLength":1},"type":{"type":"string","enum":["number"]},"render":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false}]},"format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["decimal"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["currency"]},"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["standard"]},"code":{"type":"string","minLength":1}},"required":["type","code"],"additionalProperties":false}]}},"required":["type","config"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unit"]},"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["standard"]},"unit":{"type":"string","minLength":1}},"required":["type","unit"],"additionalProperties":false}]}},"required":["type","config"],"additionalProperties":false}]}},"required":["displayName","type","render","format"],"additionalProperties":false},{"type":"object","properties":{"displayName":{"type":"string","minLength":1},"type":{"type":"string","enum":["string"]},"description":{"type":"string"},"fillerConfig":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig"},"constraints":{"type":"object","properties":{"unique":{"type":"object","properties":{"type":{"type":"string","enum":["unique"]}},"required":["type"],"additionalProperties":false}},"additionalProperties":false}},"required":["displayName","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Password"]},"title":{"type":"string"},"description":{"type":"string"},"hashAlgorithm":{"type":"string","enum":["bcrypt","argon2","scrypt","pbkdf2"],"default":"bcrypt"},"minLength":{"type":"integer","minimum":1,"default":8},"maxLength":{"type":"integer","minimum":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Assign"]},"title":{"type":"string"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DateTime"]},"title":{"type":"string"},"description":{"type":"string"},"format":{"type":"object","properties":{"time":{"type":"boolean"},"zone":{"anyOf":[{"type":"boolean"},{"type":"string"}]}},"additionalProperties":false}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DateRange"]},"title":{"type":"string"},"description":{"type":"string"},"format":{"type":"object","properties":{"time":{"type":"boolean"},"zone":{"anyOf":[{"type":"boolean"},{"type":"string"}]}},"additionalProperties":false}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["NodeText"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["NodeCompleted"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Unimplemented"]}},"required":["type"],"additionalProperties":false}]}},"required":["id","data"],"additionalProperties":false},"FieldValue":{"type":"object","properties":{"fieldId":{"type":"string"},"value":{}},"required":["fieldId"],"additionalProperties":false},"Block":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"completed":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false},"Convo":{"type":"object","properties":{"id":{"type":"string"},"space_agent_id":{"type":"string"},"status":{"type":"string","enum":["in_progress","idle","requires_review"]},"title":{"type":"string"},"data":{"type":"object","properties":{"llm":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["openai"]},"name":{"type":"string","enum":["gpt-3.5-turbo","gpt-4o","gpt-4-turbo","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","o3-mini:low","o3-mini:medium","o3-mini:high","o4-mini:low","o4-mini:medium","o4-mini:high","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-5","openai/gpt-5:high","openai/gpt-5-mini","openai/gpt-5-mini:high","openai/gpt-5-nano","openai/gpt-5-nano:high","openai/gpt-5.1","openai/gpt-5.1:low","openai/gpt-5.1:medium","openai/gpt-5.1:high","openai/gpt-5.1-codex","openai/gpt-5.1-codex:low","openai/gpt-5.1-codex:medium","openai/gpt-5.1-codex:high","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-max:medium","openai/gpt-5.1-codex-max:high","openai/gpt-5.1-codex-max:xhigh","openai/gpt-5.2","openai/gpt-5.2:medium","openai/gpt-5.2:high","openai/gpt-5.2:xhigh","openai/gpt-5.2-codex","openai/gpt-5.2-codex:medium","openai/gpt-5.2-codex:high","openai/gpt-5.2-codex:xhigh","openai/gpt-5.3-codex","openai/gpt-5.3-codex:medium","openai/gpt-5.3-codex:high","openai/gpt-5.3-codex:xhigh","openai/gpt-5.3-chat","openai/gpt-5.4","openai/gpt-5.4:medium","openai/gpt-5.4:high","openai/gpt-5.4:xhigh","openai/gpt-5.4-pro","openai/gpt-5.4-pro:medium","openai/gpt-5.4-pro:high","openai/gpt-5.4-pro:xhigh","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5","openai/gpt-5.5:medium","openai/gpt-5.5:high","openai/gpt-5.5:xhigh","openai/gpt-5.5-pro","openai/gpt-5.5-pro:medium","openai/gpt-5.5-pro:high","openai/gpt-5.5-pro:xhigh"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["anthropic"]},"name":{"type":"string","enum":["anthropic/claude-4.0-sonnet","anthropic/claude-4.0-opus","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.5:thinking","anthropic/claude-haiku-4.5","anthropic/claude-haiku-4.5:thinking","anthropic/claude-opus-4.5","anthropic/claude-opus-4.5:thinking","anthropic/claude-opus-4.8","anthropic/claude-opus-4.8:thinking","anthropic/claude-fable-5","anthropic/claude-fable-5:thinking","anthropic/claude-opus-4.7","anthropic/claude-opus-4.7:thinking","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6:thinking","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4.6:thinking","anthropic/claude-3.5-sonnet","anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["google"]},"name":{"type":"string","enum":["google/gemini-2.5-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-3-pro-preview","google/gemini-3-flash-preview","google/gemini-3.1-pro-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-flash-lite","google/gemini-3.5-flash","google/gemma-4-31b-it","google/gemma-4-26b-a4b-it"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["alibaba"]},"name":{"type":"string","enum":["alibaba/qwen3.7-plus","alibaba/qwen3.6-plus","alibaba/qwen3.6-27b","alibaba/qwen-3.6-max-preview","alibaba/qwen3.7-max"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["minimax"]},"name":{"type":"string","enum":["minimax/minimax-m3","minimax/minimax-m2.7"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["zai"]},"name":{"type":"string","enum":["zai/glm-5.1","zai/glm-5.2"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["moonshotai"]},"name":{"type":"string","enum":["moonshotai/kimi-k2.6","moonshotai/kimi-k2.7-code"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deepseek"]},"name":{"type":"string","enum":["deepseek/deepseek-v4-pro","deepseek/deepseek-v4-flash"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["xai"]},"name":{"type":"string","enum":["xai/grok-4.3","xai/grok-build-0.1"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["xiaomi"]},"name":{"type":"string","enum":["xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["nvidia"]},"name":{"type":"string","enum":["nvidia/nemotron-3-ultra-550b-a55b"]}},"required":["type","name"],"additionalProperties":false}]},"endedAt":{"type":"number"}},"additionalProperties":false}},"required":["id","space_agent_id","status","data"],"additionalProperties":false}}},"paths":{"/listSpaces":{"post":{"summary":"List spaces","tags":["Workspace"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filterBy":{"type":"object","properties":{"name":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["contains"]},"value":{"type":"string"}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["equals"]},"value":{"type":"string"}},"required":["operator","value"],"additionalProperties":false}]}},"additionalProperties":false}},"additionalProperties":false,"nullable":true}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listAgents":{"post":{"summary":"List agents","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","description":"The space ID to list agents for"},"filterBy":{"type":"object","properties":{"name":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["contains"]},"value":{"type":"string"}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["equals"]},"value":{"type":"string"}},"required":["operator","value"],"additionalProperties":false}]}},"additionalProperties":false}},"required":["spaceId"],"additionalProperties":false,"nullable":true}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tools":{"type":"object","additionalProperties":{"type":"string"}}},"required":["id","name","description","tools"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/promptAgent":{"post":{"summary":"Prompt an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","description":"The space ID to prompt the agent for"},"agentId":{"type":"string","description":"The agent ID to prompt"},"prompt":{"type":"string","description":"The prompt to send to the agent"}},"required":["spaceId","agentId","prompt"],"additionalProperties":false,"nullable":true}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"summary":{"type":"string"}},"required":["ok","summary"],"additionalProperties":false}}}}}}},"/getAgent":{"post":{"summary":"Get agent by ID","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"allOf":[{"$ref":"#/components/schemas/SpaceAgent"}],"nullable":true}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/updateAgent":{"post":{"summary":"Update an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"name":{"type":"string"},"data":{"$ref":"#/components/schemas/SpaceAgent/properties/data"}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"allOf":[{"$ref":"#/components/schemas/SpaceAgent"}],"nullable":true}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/deleteAgent":{"post":{"summary":"Delete an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}}}}},"/createAgent":{"post":{"summary":"Create an agent in a team or workspace","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","minLength":1},"name":{"type":"string"},"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"data":{"$ref":"#/components/schemas/SpaceAgent/properties/data"}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["template"]},"template":{"type":"object","properties":{"type":{"type":"string","enum":["Tasker","Researcher","Marketer","EmailWriter","Sales","CustomerSupport","ProjectManager","ContentCreator","Copywriter","LegalAdvisor","SeoSpecialist","ProductivityCoach","EngineeringExpert","Translator","Summarizer","ResumeBuilder","Storyteller","Tutor","BrandStrategist","SocialMediaSpecialist","BusinessStrategist","FinancialAnalyst","HumanResourcesManager","DataScientist","ITConsultant","FinancialAdvisor","HealthCoach","SustainabilityConsultant","UXDesigner","QualityAssuranceAnalyst","ProductManager","GrowthHacker","BusinessDevelopmentManager","PublicRelationsSpecialist","EventPlanner","DataAnalyst","Editor","CEO","InterviewCoach","TechSupportAdvisor","Doctor","BlogExpert","TweetOptimizer","EmailMarketer","CourseCreator","ScriptCreator","ScreenplayWriter","Proofreader","SalesColdEmailCoach","CodeExplainer","CreativeWritingCoach","AdvertisingCopywriter","VideoScriptWriter","ProjectArchitect","AICouncil","Negotiator","VCAssociate","Books","StartupMentor","SmallBusiness","WebDevelopment","PromptEngineer","ArticleWriter","WorkflowAgent","StrategyAgent","ViralAgent","SOPOnboardingAgent","PressReleaseAgent"]},"avatar":{"$ref":"#/components/schemas/SpaceAgent/properties/data/properties/avatar"}},"required":["type"],"additionalProperties":false}},"required":["type","template"],"additionalProperties":false}]}},"required":["folderId","name","data"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/SpaceAgent"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listConversations":{"post":{"summary":"List agent conversations","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"limit":{"type":"number","default":20},"page":{"type":"number","default":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"$ref":"#/components/schemas/Convo"}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/getConversation":{"post":{"summary":"Get agent conversation by ID","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"convoId":{"type":"string","minLength":1}},"required":["agentId","convoId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/Convo"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/addKnowledgeProject":{"post":{"summary":"Add a project as knowledge source to an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1}},"required":["agentId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/SpaceAgent"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/removeKnowledgeProject":{"post":{"summary":"Remove a project from agent knowledge sources","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1}},"required":["agentId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}}}}},"/addKnowledgeMedia":{"post":{"summary":"Add media as knowledge source to an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"mediaId":{"type":"string","minLength":1}},"required":["agentId","mediaId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/SpaceAgent"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/removeKnowledgeMedia":{"post":{"summary":"Remove media from agent knowledge sources","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"mediaId":{"type":"string","minLength":1}},"required":["agentId","mediaId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}}}}},"/enablePublicAgentAccess":{"post":{"summary":"Enable public access for an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"publicUrl":{"type":"string","format":"uri"}},"required":["ok","publicUrl"],"additionalProperties":false}}}}}}},"/getPublicAgent":{"post":{"summary":"Get public agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"data":{"type":"object","properties":{"avatar":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"data":{"type":"object","properties":{"file":{"type":"object","properties":{"ownerID":{"type":"string"},"ownerType":{"type":"string","minLength":1,"nullable":true},"id":{"type":"string"},"namespace":{"type":"string"},"extension":{"type":"string"},"s3KeyOriginal":{"type":"string"},"userID":{"type":"number","nullable":true},"spaceID":{"type":"string","minLength":1,"nullable":true},"documentID":{"type":"string","minLength":1,"nullable":true},"nodeID":{"type":"string","minLength":1,"nullable":true},"size":{"type":"number"},"mimetype":{"type":"string"},"metadata":{"type":"object","properties":{},"additionalProperties":true},"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["ownerID","id","namespace","extension","s3KeyOriginal","size","mimetype"],"additionalProperties":true}},"required":["file"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false},{"$ref":"#/components/schemas/SpaceAgent/properties/data/properties/avatar/anyOf/0"}]},"conversationStarters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"text":{"type":"string","minLength":1},"prompt":{"type":"string"}},"required":["id","text"],"additionalProperties":false}}},"additionalProperties":false},"preferences":{"type":"object","properties":{"mode":{"type":"string","enum":["template","chatbot"]},"canCopyKnowledge":{"type":"boolean"},"hideBranding":{"type":"boolean"},"theme":{"type":"string","enum":["light","dark","auto"]},"autoEndChats":{"type":"boolean"},"meta":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"image":{"allOf":[{"$ref":"#/properties/item/properties/data/properties/avatar/anyOf/0/properties/data/properties/file"}],"nullable":true}},"additionalProperties":false}},"additionalProperties":false}},"required":["id","name","data","preferences"],"additionalProperties":false},"publicUrl":{"type":"string","format":"uri"}},"required":["ok","item","publicUrl"],"additionalProperties":false}}}}}}},"/updatePublicAgent":{"post":{"summary":"Update public agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"preferences":{"type":"object","properties":{"mode":{"type":"string","enum":["template","chatbot"]},"canCopyKnowledge":{"type":"boolean"},"hideBranding":{"type":"boolean"},"theme":{"type":"string","enum":["light","dark","auto"]},"autoEndChats":{"type":"boolean"},"meta":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"image":{"type":"object","properties":{"ownerID":{"type":"string"},"ownerType":{"type":"string","minLength":1,"nullable":true},"id":{"type":"string"},"namespace":{"type":"string"},"extension":{"type":"string"},"s3KeyOriginal":{"type":"string"},"userID":{"type":"number","nullable":true},"spaceID":{"type":"string","minLength":1,"nullable":true},"documentID":{"type":"string","minLength":1,"nullable":true},"nodeID":{"type":"string","minLength":1,"nullable":true},"size":{"type":"number"},"mimetype":{"type":"string"},"metadata":{"type":"object","properties":{},"additionalProperties":true},"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["ownerID","id","namespace","extension","s3KeyOriginal","size","mimetype"],"additionalProperties":true,"nullable":true}},"additionalProperties":false}},"additionalProperties":false}},"required":["agentId","preferences"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"data":{"type":"object","properties":{"avatar":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"data":{"type":"object","properties":{"file":{"type":"object","properties":{"ownerID":{"type":"string"},"ownerType":{"type":"string","minLength":1,"nullable":true},"id":{"type":"string"},"namespace":{"type":"string"},"extension":{"type":"string"},"s3KeyOriginal":{"type":"string"},"userID":{"type":"number","nullable":true},"spaceID":{"type":"string","minLength":1,"nullable":true},"documentID":{"type":"string","minLength":1,"nullable":true},"nodeID":{"type":"string","minLength":1,"nullable":true},"size":{"type":"number"},"mimetype":{"type":"string"},"metadata":{"type":"object","properties":{},"additionalProperties":true},"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["ownerID","id","namespace","extension","s3KeyOriginal","size","mimetype"],"additionalProperties":true}},"required":["file"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false},{"$ref":"#/components/schemas/SpaceAgent/properties/data/properties/avatar/anyOf/0"}]},"conversationStarters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"text":{"type":"string","minLength":1},"prompt":{"type":"string"}},"required":["id","text"],"additionalProperties":false}}},"additionalProperties":false},"preferences":{"type":"object","properties":{"mode":{"type":"string","enum":["template","chatbot"]},"canCopyKnowledge":{"type":"boolean"},"hideBranding":{"type":"boolean"},"theme":{"type":"string","enum":["light","dark","auto"]},"autoEndChats":{"type":"boolean"},"meta":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"image":{"allOf":[{"$ref":"#/properties/item/properties/data/properties/avatar/anyOf/0/properties/data/properties/file"}],"nullable":true}},"additionalProperties":false}},"additionalProperties":false}},"required":["id","name","data","preferences"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/generateAgent":{"post":{"summary":"Generate agent based on input text prompts","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","minLength":1},"text":{"type":"string"}},"required":["folderId","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/SpaceAgent"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listProjects":{"post":{"summary":"List projects in a workspace","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"The workspace/space ID to list projects for"}},"required":["spaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/getProject":{"post":{"summary":"Get a project by ID","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to retrieve"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/createProject":{"post":{"summary":"Create a project in a workspace","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"The workspace/space ID to create the project in"},"contentType":{"type":"string","enum":["text/markdown"]},"content":{"type":"string","description":"Markdown content for the project"}},"required":["spaceId","contentType","content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listTasks":{"post":{"summary":"List tasks in a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to list tasks for"},"limit":{"type":"number","default":100},"after":{"type":"string","description":"Cursor: task ID to get tasks after (do not combine with before)"},"before":{"type":"string","description":"Cursor: task ID to get tasks before (do not combine with after)"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"parentId":{"type":"string"},"completed":{"type":"boolean"}},"required":["id","text","completed"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/completeProject":{"post":{"summary":"Mark a project as completed (archived)","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to mark as completed"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/restoreProject":{"post":{"summary":"Restore a completed (archived) project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to restore"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/copyProject":{"post":{"summary":"Copy a project to a workspace","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The source project ID to copy"},"destinationSpaceId":{"type":"string","minLength":1,"description":"The destination workspace/space ID"},"projectTitle":{"type":"string","minLength":1,"description":"Optional title for the copied project"}},"required":["projectId","destinationSpaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/createProjectFromTemplate":{"post":{"summary":"Create a project from a custom template","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"The destination workspace/space ID"},"templateId":{"type":"string","minLength":1,"description":"The template project ID to create from"}},"required":["spaceId","templateId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listFields":{"post":{"summary":"Get all custom fields for a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to get fields for"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"data":{"$ref":"#/components/schemas/Field/properties/data"}},"required":["id","data"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listProjectMembers":{"post":{"summary":"Get members of a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to get members for"},"limit":{"type":"number","default":20},"page":{"type":"number","default":1}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"displayName":{"type":"string"}},"required":["handle"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/getShareLink":{"post":{"summary":"Get share link for a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to get share link for"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"checkUrl":{"type":"string","format":"uri"},"editUrl":{"type":"string","format":"uri"},"viewUrl":{"type":"string","format":"uri"}},"required":["editUrl","viewUrl"],"additionalProperties":false,"nullable":true}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/enableShareLink":{"post":{"summary":"Enable share link for a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to enable share link for"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"checkUrl":{"type":"string","format":"uri"},"editUrl":{"type":"string","format":"uri"},"viewUrl":{"type":"string","format":"uri"}},"required":["editUrl","viewUrl"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listBlocks":{"post":{"summary":"List top-level blocks in a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to list blocks for"},"limit":{"type":"number","default":100},"after":{"type":"string","description":"Cursor: block ID to get blocks after (do not combine with before)"},"before":{"type":"string","description":"Cursor: block ID to get blocks before (do not combine with after)"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"completed":{"type":"boolean"}},"required":["id","completed"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listFolders":{"post":{"summary":"List folders in a workspace","tags":["Workspace"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1}},"required":["spaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listMedia":{"post":{"summary":"List media in a folder","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","minLength":1},"limit":{"type":"number","default":100},"page":{"type":"number","default":1}},"required":["folderId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Media"}],"nullable":true}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listTemplates":{"post":{"summary":"List project templates in a folder","tags":["Workspace"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","minLength":1},"limit":{"type":"number","default":20},"page":{"type":"number","default":1}},"required":["folderId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ProjectTemplate"}],"nullable":true}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/importBundleZip":{"post":{"summary":"Import a ZIP/.tsk bundle into a workspace. Send the file as the raw request body with Content-Type: application/zip, application/octet-stream, or application/x-tsk. Pass workspaceId as a query parameter. Maximum file size: 50 MB.","tags":["Bundle"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"workspaceId","required":true,"description":"The target workspace ID to import the bundle into."}],"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/BundleInstallation"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/exportBundle":{"post":{"summary":"Export a space as a JSON bundle","tags":["Bundle"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"The space (subspace / app) ID to export."}},"required":["spaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"version":{"type":"string","enum":["1"],"description":"Bundle format version."},"items":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":true},"description":"Map of bundle items keyed by ID. Each item has a `type` field: space-bundle-flow-item, space-bundle-project-item, space-bundle-agent-item, space-bundle-template-item, space-bundle-media-item, space-bundle-app-item."}},"required":["version","items"],"additionalProperties":false,"description":"SpaceBundleData v1 — Workspace DNA bundle."}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/importBundle":{"post":{"summary":"Import a JSON bundle into a workspace","tags":["Bundle"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"description":"The target workspace ID to import the bundle into."},"bundleData":{"type":"object","properties":{"version":{"type":"string","enum":["1"],"description":"Bundle format version."},"items":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":true},"description":"Map of bundle items keyed by ID. Each item has a `type` field: space-bundle-flow-item, space-bundle-project-item, space-bundle-agent-item, space-bundle-template-item, space-bundle-media-item, space-bundle-app-item."}},"required":["version","items"],"additionalProperties":false,"description":"The Workspace DNA bundle to import (SpaceBundleData v1)."}},"required":["workspaceId","bundleData"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/BundleInstallation"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/bundles/{spaceId}/export/zip":{"get":{"summary":"Export a space as a ZIP bundle. Returns raw binary with appropriate headers.","tags":["Bundle"],"parameters":[{"schema":{"type":"string","enum":["zip","tsk"],"default":"zip"},"in":"query","name":"format","required":false,"description":"Export format: \"zip\" (default) or \"tsk\" (.tsk app kit)."},{"schema":{"type":"string","minLength":1},"in":"path","name":"spaceId","required":true,"description":"The space (subspace / app) ID to export."}],"responses":{"200":{"description":"Default Response"}}}},"/uploadMedia":{"post":{"summary":"Upload a media file to a space. Send the file as the raw request body with the appropriate Content-Type header. Pass spaceId and filename as query parameters. Maximum file size: 25 MB.","tags":["Media"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"spaceId","required":true,"description":"The space ID to upload media into (can be a root workspace or a subspace / app)."},{"schema":{"type":"string","minLength":1},"in":"query","name":"filename","required":true,"description":"Original filename of the uploaded file (e.g. \"photo.png\")."}],"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"mediaId":{"type":"string","description":"The SpaceMedia record ID (UUID)."},"fileId":{"type":"string","description":"The file ID used in S3."},"kind":{"type":"string","description":"Detected media kind (image, video, audio, document, etc.)."},"downloadUrl":{"type":"string","description":"Public URL to download the uploaded file."}},"required":["mediaId","fileId","kind","downloadUrl"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/getMedia":{"post":{"summary":"Get media by ID","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mediaId":{"type":"string","minLength":1,"description":"The media ID to retrieve."}},"required":["mediaId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"allOf":[{"$ref":"#/components/schemas/Media"}],"nullable":true}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/deleteMedia":{"post":{"summary":"Delete a media by ID","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mediaId":{"type":"string","minLength":1,"description":"The media ID to delete."}},"required":["mediaId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}}}}},"/media/{mediaId}/content":{"get":{"summary":"Download a media file by ID. Returns raw binary with appropriate headers.","tags":["Media"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"mediaId","required":true,"description":"The media ID to download."}],"responses":{"200":{"description":"Default Response"}}}},"/media/spaces/{spaceId}/content":{"get":{"summary":"Download all media files from a space as a ZIP archive. Each file is stored as {mediaId}/metadata.json and {mediaId}/original. Maximum 100 files per space.","tags":["Media"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"spaceId","required":true,"description":"The space ID to download all media from."}],"responses":{"200":{"description":"Default Response"}}}},"/listMyProjects":{"post":{"summary":"List my recently viewed projects","tags":["Me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"number","default":100},"page":{"type":"number","default":1},"sort":{"type":"string","enum":["viewed-asc","viewed-desc"],"default":"viewed-desc"}},"additionalProperties":false,"nullable":true}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/subscribeWebhook":{"post":{"summary":"Subscribe to a webhook for a Taskade event","tags":["Webhook"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetUrl":{"type":"string","format":"uri"},"triggerType":{"type":"string","enum":["task.due","comment.created","task.assigned","project.created","project.assigned","project.joined"]}},"required":["targetUrl","triggerType"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"hookId":{"type":"string"}},"required":["ok","hookId"],"additionalProperties":false}}}}}}},"/unsubscribeWebhook":{"post":{"summary":"Remove a previously-created webhook subscription","tags":["Webhook"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hookId":{"type":"string","minLength":1}},"required":["hookId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"deleted":{"type":"boolean"}},"required":["ok","deleted"],"additionalProperties":false}}}}}}}},"servers":[{"url":"https://www.taskade.com/api/v2","description":"Public API server"}],"security":[{"oAuthAuthorizationCode":[],"personalAccessToken":[]}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Taskade Public API (v2)","description":"Taskade Action API (v2, Beta) — RPC-style operations (POST /listSpaces, /promptAgent, …) returning an ok-discriminated envelope ({ ok: true, items | item, … } on success; { ok: false, code, message } on error). Adds agent capabilities v1 lacks; tasks are read-only in v2 — use the REST API v1 for full task CRUD.","version":"2.0.0-beta"},"components":{"securitySchemes":{"oAuthAuthorizationCode":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://www.taskade.com/oauth2/authorize","tokenUrl":"https://www.taskade.com/oauth2/token","scopes":{}}}},"personalAccessToken":{"type":"http","scheme":"bearer"}},"schemas":{"BundleInstallation":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the bundle installation."},"projectCount":{"type":"number","description":"Number of projects installed."},"flowCount":{"type":"number","description":"Number of automations installed."},"agentCount":{"type":"number","description":"Number of agents installed."},"templateCount":{"type":"number","description":"Number of templates installed."},"mediaCount":{"type":"number","description":"Number of media files installed."},"appCount":{"type":"number","description":"Number of apps installed."}},"required":["id","projectCount","flowCount","agentCount","templateCount","mediaCount","appCount"],"additionalProperties":false},"Project":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project. An alphanumeric string that is 16 characters long."},"name":{"type":"string","description":"The project’s name or title."}},"required":["id"],"additionalProperties":false},"ProjectShare":{"type":"object","properties":{"checkUrl":{"type":"string","format":"uri"},"editUrl":{"type":"string","format":"uri"},"viewUrl":{"type":"string","format":"uri"}},"required":["editUrl","viewUrl"],"additionalProperties":false,"description":"The share links of a project"},"ProjectTemplate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"Error":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"message":{"type":"string"},"code":{"type":"string"},"statusMessage":{"type":"string"}},"required":["ok","message","code","statusMessage"],"additionalProperties":false,"description":"Error description"},"Task":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"parentId":{"type":"string"},"completed":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false},"TaskNote":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false},"Date":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"ISO date format (YYYY-MM-DD), e.g. \"2021-12-31\""},"time":{"type":"string","pattern":"^(?:[0-1][0-9]|[2][0-3]):[0-5][0-9](?::[0-5][0-9])?$","nullable":true,"description":"Optional time component in 24-hour format (HH:MM:SS), e.g. \"15:30:45\". Can be null or omitted for date-only representations"},"timezone":{"type":"string","nullable":true,"description":"Optional timezone identifier (IANA timezone name), e.g. \"America/New_York\", \"Asia/Singapore\". Can be null or omitted for timezone-naive representations"}},"required":["date"],"additionalProperties":false},"SpaceAgent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"space_id":{"type":"string"},"data":{"type":"object","properties":{"commands":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable name of the command in title case. This should probably be a verb."},"description":{"type":"string","nullable":true,"description":"Short summary for discovery (e.g. progressive disclosure / skill listing). The full instruction stays in `prompt`."},"prompt":{"type":"string","minLength":1,"description":"Tell the agent what this command will do. It should be positioned as a direct instruction to the agent. At least 30 words."},"id":{"type":"string","minLength":1,"description":"ID based on the name in snake case."},"mode":{"type":"string","enum":["default","plan-and-execute-v1","plan-and-execute-v2"],"default":"default"}},"required":["name","prompt","id"],"additionalProperties":false}},"description":{"type":"string","description":"Role and purpose of agent, positioned as a direct instruction to the agent. Example: \"You are a doctor that helps save lives.\". At least 100 words."},"tone":{"type":"string","enum":["authoritative","clinical","cold","confident","cynical","emotional","empathetic","formal","friendly","humourous","informal","ironic","optimistic","pessimistic","playful","sarcastic","serious","sympathetic","tentative","warm","creative","inspiring","casual"]},"avatar":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["emoji"]},"data":{"type":"object","properties":{"value":{"type":"string","description":"Pick the most suitable emoji for this agent."}},"required":["value"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}]},"knowledgeEnabled":{"type":"boolean"},"language":{"type":"string","description":"The language of the agent, e.g. en-US, zh-Hans"},"inputPlaceholder":{"type":"string","nullable":true}},"required":["commands"],"additionalProperties":false}},"required":["id","name","space_id","data"],"additionalProperties":false},"Media":{"type":"object","properties":{"id":{"type":"string"},"space_id":{"type":"string"},"kind":{"type":"string"}},"required":["id","space_id","kind"],"additionalProperties":false},"User":{"type":"object","properties":{"handle":{"type":"string"},"displayName":{"type":"string"}},"required":["handle"],"additionalProperties":false},"Field":{"type":"object","properties":{"id":{"type":"string"},"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Note"]},"fillerConfig":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string.translate"]},"sourceRef":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["field"]},"fieldPath":{"type":"string"}},"required":["type","fieldPath"],"additionalProperties":false}]},"targetLang":{"type":"string"}},"required":["type","sourceRef","targetLang"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["string.summarize"]},"sourceRef":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig/anyOf/0/properties/sourceRef"},"additionalInstructions":{"type":"string"}},"required":["type","sourceRef"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["string.extract"]},"sourceRef":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig/anyOf/0/properties/sourceRef"},"entity":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["email_address"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["first_name"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["last_name"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["phone_number"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["domain_name"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["link"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["date"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["time"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["year"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"instructions":{"type":"string"}},"required":["type","instructions"],"additionalProperties":false}]}},"required":["type","sourceRef","entity"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["string.custom"]},"instructions":{"type":"string"}},"required":["type","instructions"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Select.pick"]},"sourceRef":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig/anyOf/0/properties/sourceRef"},"permittedOptionIds":{"type":"array","items":{"type":"string"}},"additionalInstructions":{"type":"string"}},"required":["type","sourceRef","permittedOptionIds"],"additionalProperties":false}]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Timestamp"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["TimestampAt"]},"displayName":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["TimestampAuthor"]},"displayName":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"displayName":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["Select"]},"options":{"type":"object","additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"rank":{"type":"string"},"description":{"type":"string"},"color":{"type":"string"}},"required":["id","name","rank"],"additionalProperties":false}},"defaultOption":{"type":"string"},"fillerConfig":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig"}},"required":["displayName","type","options"],"additionalProperties":false},{"type":"object","properties":{"displayName":{"type":"string","minLength":1},"type":{"type":"string","enum":["number"]},"render":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false}]},"format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["decimal"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["currency"]},"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["standard"]},"code":{"type":"string","minLength":1}},"required":["type","code"],"additionalProperties":false}]}},"required":["type","config"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unit"]},"config":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["standard"]},"unit":{"type":"string","minLength":1}},"required":["type","unit"],"additionalProperties":false}]}},"required":["type","config"],"additionalProperties":false}]}},"required":["displayName","type","render","format"],"additionalProperties":false},{"type":"object","properties":{"displayName":{"type":"string","minLength":1},"type":{"type":"string","enum":["string"]},"description":{"type":"string"},"fillerConfig":{"$ref":"#/properties/data/anyOf/1/properties/fillerConfig"},"constraints":{"type":"object","properties":{"unique":{"type":"object","properties":{"type":{"type":"string","enum":["unique"]}},"required":["type"],"additionalProperties":false}},"additionalProperties":false}},"required":["displayName","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Password"]},"title":{"type":"string"},"description":{"type":"string"},"hashAlgorithm":{"type":"string","enum":["bcrypt","argon2","scrypt","pbkdf2"],"default":"bcrypt"},"minLength":{"type":"integer","minimum":1,"default":8},"maxLength":{"type":"integer","minimum":1}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"displayName":{"type":"string","minLength":1},"type":{"type":"string","enum":["Rating"]},"max":{"type":"integer","minimum":1,"maximum":10,"default":5},"icon":{"type":"string","enum":["star","heart"],"default":"star"}},"required":["displayName","type"],"additionalProperties":false},{"type":"object","properties":{"displayName":{"type":"string","minLength":1},"type":{"type":"string","enum":["Relationship"]}},"required":["displayName","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Assign"]},"title":{"type":"string"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DateTime"]},"title":{"type":"string"},"description":{"type":"string"},"format":{"type":"object","properties":{"time":{"type":"boolean"},"zone":{"anyOf":[{"type":"boolean"},{"type":"string"}]}},"additionalProperties":false}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DateRange"]},"title":{"type":"string"},"description":{"type":"string"},"format":{"type":"object","properties":{"time":{"type":"boolean"},"zone":{"anyOf":[{"type":"boolean"},{"type":"string"}]}},"additionalProperties":false}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["NodeText"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["NodeCompleted"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Media"]},"title":{"type":"string"},"description":{"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["Unimplemented"]}},"required":["type"],"additionalProperties":false}]}},"required":["id","data"],"additionalProperties":false},"FieldValue":{"type":"object","properties":{"fieldId":{"type":"string"},"value":{}},"required":["fieldId"],"additionalProperties":false},"Block":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"completed":{"type":"boolean","default":false}},"required":["id"],"additionalProperties":false},"Convo":{"type":"object","properties":{"id":{"type":"string"},"space_agent_id":{"type":"string"},"status":{"type":"string","enum":["in_progress","idle","requires_review"]},"title":{"type":"string"},"data":{"type":"object","properties":{"llm":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["openai"]},"name":{"type":"string","enum":["gpt-3.5-turbo","gpt-4o","gpt-4-turbo","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","o3-mini:low","o3-mini:medium","o3-mini:high","o4-mini:low","o4-mini:medium","o4-mini:high","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-4.1","openai/gpt-4.1-mini","openai/gpt-4.1-nano","openai/gpt-5","openai/gpt-5:high","openai/gpt-5-mini","openai/gpt-5-mini:high","openai/gpt-5-nano","openai/gpt-5-nano:high","openai/gpt-5.1","openai/gpt-5.1:low","openai/gpt-5.1:medium","openai/gpt-5.1:high","openai/gpt-5.1-codex","openai/gpt-5.1-codex:low","openai/gpt-5.1-codex:medium","openai/gpt-5.1-codex:high","openai/gpt-5.1-codex-max","openai/gpt-5.1-codex-max:medium","openai/gpt-5.1-codex-max:high","openai/gpt-5.1-codex-max:xhigh","openai/gpt-5.2","openai/gpt-5.2:medium","openai/gpt-5.2:high","openai/gpt-5.2:xhigh","openai/gpt-5.2-codex","openai/gpt-5.2-codex:medium","openai/gpt-5.2-codex:high","openai/gpt-5.2-codex:xhigh","openai/gpt-5.3-codex","openai/gpt-5.3-codex:medium","openai/gpt-5.3-codex:high","openai/gpt-5.3-codex:xhigh","openai/gpt-5.3-chat","openai/gpt-5.4","openai/gpt-5.4:medium","openai/gpt-5.4:high","openai/gpt-5.4:xhigh","openai/gpt-5.4-pro","openai/gpt-5.4-pro:medium","openai/gpt-5.4-pro:high","openai/gpt-5.4-pro:xhigh","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.5","openai/gpt-5.5:medium","openai/gpt-5.5:high","openai/gpt-5.5:xhigh","openai/gpt-5.5-pro","openai/gpt-5.5-pro:medium","openai/gpt-5.5-pro:high","openai/gpt-5.5-pro:xhigh"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["anthropic"]},"name":{"type":"string","enum":["anthropic/claude-4.0-sonnet","anthropic/claude-4.0-opus","anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4.5:thinking","anthropic/claude-haiku-4.5","anthropic/claude-haiku-4.5:thinking","anthropic/claude-opus-4.5","anthropic/claude-opus-4.5:thinking","anthropic/claude-opus-4.8","anthropic/claude-opus-4.8:thinking","anthropic/claude-fable-5","anthropic/claude-fable-5:thinking","anthropic/claude-opus-4.7","anthropic/claude-opus-4.7:thinking","anthropic/claude-opus-4.6","anthropic/claude-opus-4.6:thinking","anthropic/claude-sonnet-5","anthropic/claude-sonnet-5:thinking","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4.6:thinking","anthropic/claude-3.5-sonnet","anthropic/claude-3.5-haiku","anthropic/claude-3.7-sonnet"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["google"]},"name":{"type":"string","enum":["google/gemini-2.5-pro","google/gemini-2.5-flash","google/gemini-2.5-flash-lite","google/gemini-3-pro-preview","google/gemini-3-flash-preview","google/gemini-3-flash","google/gemini-3.1-pro-preview","google/gemini-3.1-flash-lite-preview","google/gemini-3.1-flash-lite","google/gemini-3.5-flash","google/gemma-4-31b-it","google/gemma-4-26b-a4b-it"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["alibaba"]},"name":{"type":"string","enum":["alibaba/qwen3.7-plus","alibaba/qwen3.6-plus","alibaba/qwen3.6-27b","alibaba/qwen-3.6-max-preview","alibaba/qwen3.7-max"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["minimax"]},"name":{"type":"string","enum":["minimax/minimax-m3","minimax/minimax-m2.7"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["zai"]},"name":{"type":"string","enum":["zai/glm-5.1","zai/glm-5.2"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["moonshotai"]},"name":{"type":"string","enum":["moonshotai/kimi-k2.6","moonshotai/kimi-k2.7-code"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["deepseek"]},"name":{"type":"string","enum":["deepseek/deepseek-v4-pro","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro:high","deepseek/deepseek-v4-pro:max","deepseek/deepseek-v4-flash:max"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["xai"]},"name":{"type":"string","enum":["xai/grok-4.3","xai/grok-build-0.1"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["xiaomi"]},"name":{"type":"string","enum":["xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["nvidia"]},"name":{"type":"string","enum":["nvidia/nemotron-3-ultra-550b-a55b"]}},"required":["type","name"],"additionalProperties":false}]},"endedAt":{"type":"number"}},"additionalProperties":false}},"required":["id","space_agent_id","status","data"],"additionalProperties":false}}},"paths":{"/listSpaces":{"post":{"summary":"List spaces","tags":["Workspace"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filterBy":{"type":"object","properties":{"name":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["contains"]},"value":{"type":"string"}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["equals"]},"value":{"type":"string"}},"required":["operator","value"],"additionalProperties":false}]}},"additionalProperties":false}},"additionalProperties":false,"nullable":true}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listAgents":{"post":{"summary":"List agents","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","description":"The space ID to list agents for"},"filterBy":{"type":"object","properties":{"name":{"anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["contains"]},"value":{"type":"string"}},"required":["operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["equals"]},"value":{"type":"string"}},"required":["operator","value"],"additionalProperties":false}]}},"additionalProperties":false}},"required":["spaceId"],"additionalProperties":false,"nullable":true}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tools":{"type":"object","additionalProperties":{"type":"string"}}},"required":["id","name","description","tools"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/promptAgent":{"post":{"summary":"Prompt an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","description":"The space ID to prompt the agent for"},"agentId":{"type":"string","description":"The agent ID to prompt"},"prompt":{"type":"string","description":"The prompt to send to the agent"}},"required":["spaceId","agentId","prompt"],"additionalProperties":false,"nullable":true}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"summary":{"type":"string"}},"required":["ok","summary"],"additionalProperties":false}}}}}}},"/getAgent":{"post":{"summary":"Get agent by ID","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"allOf":[{"$ref":"#/components/schemas/SpaceAgent"}],"nullable":true}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/updateAgent":{"post":{"summary":"Update an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"name":{"type":"string"},"data":{"$ref":"#/components/schemas/SpaceAgent/properties/data"}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"allOf":[{"$ref":"#/components/schemas/SpaceAgent"}],"nullable":true}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/deleteAgent":{"post":{"summary":"Delete an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}}}}},"/createAgent":{"post":{"summary":"Create an agent in a team or workspace","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","minLength":1},"name":{"type":"string"},"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"data":{"$ref":"#/components/schemas/SpaceAgent/properties/data"}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["template"]},"template":{"type":"object","properties":{"type":{"type":"string","enum":["Tasker","Researcher","Marketer","EmailWriter","Sales","CustomerSupport","ProjectManager","ContentCreator","Copywriter","LegalAdvisor","SeoSpecialist","ProductivityCoach","EngineeringExpert","Translator","Summarizer","ResumeBuilder","Storyteller","Tutor","BrandStrategist","SocialMediaSpecialist","BusinessStrategist","FinancialAnalyst","HumanResourcesManager","DataScientist","ITConsultant","FinancialAdvisor","HealthCoach","SustainabilityConsultant","UXDesigner","QualityAssuranceAnalyst","ProductManager","GrowthHacker","BusinessDevelopmentManager","PublicRelationsSpecialist","EventPlanner","DataAnalyst","Editor","CEO","InterviewCoach","TechSupportAdvisor","Doctor","BlogExpert","TweetOptimizer","EmailMarketer","CourseCreator","ScriptCreator","ScreenplayWriter","Proofreader","SalesColdEmailCoach","CodeExplainer","CreativeWritingCoach","AdvertisingCopywriter","VideoScriptWriter","ProjectArchitect","AICouncil","Negotiator","VCAssociate","Books","StartupMentor","SmallBusiness","WebDevelopment","PromptEngineer","ArticleWriter","WorkflowAgent","StrategyAgent","ViralAgent","SOPOnboardingAgent","PressReleaseAgent","Designer","Brainstormer","Builder","ResearchAnalyst","OperationsManager","CodeReviewer","LeadScorer","ContactEnricher","ContentStrategist","DealMover","Estimator","DigitalTwin","WatchFloorBriefer","AnomalySpotter","RestockAdvisor","AppDoctor","RenewalChaser","WinBackSpecialist","NoShowRescuer","AbandonedCartRecoverer","ReviewResponder","TestimonialHarvester","SponsorshipManager","CourseLaunchStrategist","CurriculumAuthor","PersonalizedRoadmapGenerator","DispatchCoordinator","ProviderNetworkBuilder","ClaimsClerk","ListingMarketer","GrantWriter","ComplianceKeeper","LeadQualifier","ClientOnboardingConcierge","PipelineReporter","LearnerCoach"]},"avatar":{"$ref":"#/components/schemas/SpaceAgent/properties/data/properties/avatar"}},"required":["type"],"additionalProperties":false}},"required":["type","template"],"additionalProperties":false}]}},"required":["folderId","name","data"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/SpaceAgent"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listConversations":{"post":{"summary":"List agent conversations","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"limit":{"type":"number","default":20},"page":{"type":"number","default":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"$ref":"#/components/schemas/Convo"}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/getConversation":{"post":{"summary":"Get agent conversation by ID","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"convoId":{"type":"string","minLength":1},"includeTranscript":{"type":"boolean","default":false}},"required":["agentId","convoId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/Convo"},"transcript":{"type":"string"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/addKnowledgeProject":{"post":{"summary":"Add a project as knowledge source to an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1}},"required":["agentId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/SpaceAgent"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/removeKnowledgeProject":{"post":{"summary":"Remove a project from agent knowledge sources","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1}},"required":["agentId","projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}}}}},"/addKnowledgeMedia":{"post":{"summary":"Add media as knowledge source to an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"mediaId":{"type":"string","minLength":1}},"required":["agentId","mediaId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/SpaceAgent"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/removeKnowledgeMedia":{"post":{"summary":"Remove media from agent knowledge sources","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"mediaId":{"type":"string","minLength":1}},"required":["agentId","mediaId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}}}}},"/enablePublicAgentAccess":{"post":{"summary":"Enable public access for an agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"publicUrl":{"type":"string","format":"uri"}},"required":["ok","publicUrl"],"additionalProperties":false}}}}}}},"/getPublicAgent":{"post":{"summary":"Get public agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1}},"required":["agentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"data":{"type":"object","properties":{"avatar":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"data":{"type":"object","properties":{"file":{"type":"object","properties":{"ownerID":{"type":"string"},"ownerType":{"type":"string","minLength":1,"nullable":true},"id":{"type":"string"},"namespace":{"type":"string"},"extension":{"type":"string"},"s3KeyOriginal":{"type":"string"},"userID":{"type":"number","nullable":true},"spaceID":{"type":"string","minLength":1,"nullable":true},"documentID":{"type":"string","minLength":1,"nullable":true},"nodeID":{"type":"string","minLength":1,"nullable":true},"size":{"type":"number"},"mimetype":{"type":"string"},"metadata":{"type":"object","properties":{},"additionalProperties":true},"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["ownerID","id","namespace","extension","s3KeyOriginal","size","mimetype"],"additionalProperties":true}},"required":["file"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false},{"$ref":"#/components/schemas/SpaceAgent/properties/data/properties/avatar/anyOf/0"}]},"conversationStarters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"text":{"type":"string","minLength":1},"prompt":{"type":"string"}},"required":["id","text"],"additionalProperties":false}}},"additionalProperties":false},"preferences":{"type":"object","properties":{"mode":{"type":"string","enum":["template","chatbot"]},"canCopyKnowledge":{"type":"boolean"},"hideBranding":{"type":"boolean"},"theme":{"type":"string","enum":["light","dark","auto"]},"autoEndChats":{"type":"boolean"},"meta":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"image":{"allOf":[{"$ref":"#/properties/item/properties/data/properties/avatar/anyOf/0/properties/data/properties/file"}],"nullable":true}},"additionalProperties":false},"color":{"type":"string"},"launcherIcon":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["emoji"]},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"image":{"$ref":"#/properties/item/properties/data/properties/avatar/anyOf/0/properties/data/properties/file"}},"required":["type","image"],"additionalProperties":false}],"nullable":true}},"additionalProperties":false}},"required":["id","name","data","preferences"],"additionalProperties":false},"publicUrl":{"type":"string","format":"uri"}},"required":["ok","item","publicUrl"],"additionalProperties":false}}}}}}},"/updatePublicAgent":{"post":{"summary":"Update public agent","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","minLength":1},"preferences":{"type":"object","properties":{"mode":{"type":"string","enum":["template","chatbot"]},"canCopyKnowledge":{"type":"boolean"},"hideBranding":{"type":"boolean"},"theme":{"type":"string","enum":["light","dark","auto"]},"autoEndChats":{"type":"boolean"},"meta":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"image":{"type":"object","properties":{"ownerID":{"type":"string"},"ownerType":{"type":"string","minLength":1,"nullable":true},"id":{"type":"string"},"namespace":{"type":"string"},"extension":{"type":"string"},"s3KeyOriginal":{"type":"string"},"userID":{"type":"number","nullable":true},"spaceID":{"type":"string","minLength":1,"nullable":true},"documentID":{"type":"string","minLength":1,"nullable":true},"nodeID":{"type":"string","minLength":1,"nullable":true},"size":{"type":"number"},"mimetype":{"type":"string"},"metadata":{"type":"object","properties":{},"additionalProperties":true},"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["ownerID","id","namespace","extension","s3KeyOriginal","size","mimetype"],"additionalProperties":true,"nullable":true}},"additionalProperties":false},"color":{"type":"string"},"launcherIcon":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["emoji"]},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"image":{"$ref":"#/properties/preferences/properties/meta/properties/image"}},"required":["type","image"],"additionalProperties":false}],"nullable":true}},"additionalProperties":false}},"required":["agentId","preferences"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"data":{"type":"object","properties":{"avatar":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"data":{"type":"object","properties":{"file":{"type":"object","properties":{"ownerID":{"type":"string"},"ownerType":{"type":"string","minLength":1,"nullable":true},"id":{"type":"string"},"namespace":{"type":"string"},"extension":{"type":"string"},"s3KeyOriginal":{"type":"string"},"userID":{"type":"number","nullable":true},"spaceID":{"type":"string","minLength":1,"nullable":true},"documentID":{"type":"string","minLength":1,"nullable":true},"nodeID":{"type":"string","minLength":1,"nullable":true},"size":{"type":"number"},"mimetype":{"type":"string"},"metadata":{"type":"object","properties":{},"additionalProperties":true},"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["ownerID","id","namespace","extension","s3KeyOriginal","size","mimetype"],"additionalProperties":true}},"required":["file"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false},{"$ref":"#/components/schemas/SpaceAgent/properties/data/properties/avatar/anyOf/0"}]},"conversationStarters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"text":{"type":"string","minLength":1},"prompt":{"type":"string"}},"required":["id","text"],"additionalProperties":false}}},"additionalProperties":false},"preferences":{"type":"object","properties":{"mode":{"type":"string","enum":["template","chatbot"]},"canCopyKnowledge":{"type":"boolean"},"hideBranding":{"type":"boolean"},"theme":{"type":"string","enum":["light","dark","auto"]},"autoEndChats":{"type":"boolean"},"meta":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"image":{"allOf":[{"$ref":"#/properties/item/properties/data/properties/avatar/anyOf/0/properties/data/properties/file"}],"nullable":true}},"additionalProperties":false},"color":{"type":"string"},"launcherIcon":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["emoji"]},"value":{"type":"string","minLength":1}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"image":{"$ref":"#/properties/item/properties/data/properties/avatar/anyOf/0/properties/data/properties/file"}},"required":["type","image"],"additionalProperties":false}],"nullable":true}},"additionalProperties":false}},"required":["id","name","data","preferences"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/generateAgent":{"post":{"summary":"Generate agent based on input text prompts","tags":["Agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","minLength":1},"text":{"type":"string"}},"required":["folderId","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/SpaceAgent"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listProjects":{"post":{"summary":"List projects in a workspace","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"The workspace/space ID to list projects for"}},"required":["spaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/getProject":{"post":{"summary":"Get a project by ID","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to retrieve"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/createProject":{"post":{"summary":"Create a project in a workspace","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"The workspace/space ID to create the project in"},"contentType":{"type":"string","enum":["text/markdown"]},"content":{"type":"string","description":"Markdown content for the project"}},"required":["spaceId","contentType","content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listTasks":{"post":{"summary":"List tasks in a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to list tasks for"},"limit":{"type":"number","default":100},"after":{"type":"string","description":"Cursor: task ID to get tasks after (do not combine with before)"},"before":{"type":"string","description":"Cursor: task ID to get tasks before (do not combine with after)"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"parentId":{"type":"string"},"completed":{"type":"boolean"}},"required":["id","text","completed"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/completeProject":{"post":{"summary":"Mark a project as completed (archived)","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to mark as completed"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/restoreProject":{"post":{"summary":"Restore a completed (archived) project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to restore"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/copyProject":{"post":{"summary":"Copy a project to a workspace","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The source project ID to copy"},"destinationSpaceId":{"type":"string","minLength":1,"description":"The destination workspace/space ID"},"projectTitle":{"type":"string","minLength":1,"description":"Optional title for the copied project"}},"required":["projectId","destinationSpaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/createProjectFromTemplate":{"post":{"summary":"Create a project from a custom template","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"The destination workspace/space ID"},"templateId":{"type":"string","minLength":1,"description":"The template project ID to create from"}},"required":["spaceId","templateId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project"},"name":{"type":"string","description":"The project's name or title"}},"required":["id"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listFields":{"post":{"summary":"Get all custom fields for a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to get fields for"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"data":{"$ref":"#/components/schemas/Field/properties/data"}},"required":["id","data"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listProjectMembers":{"post":{"summary":"Get members of a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to get members for"},"limit":{"type":"number","default":20},"page":{"type":"number","default":1}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"displayName":{"type":"string"}},"required":["handle"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/getShareLink":{"post":{"summary":"Get share link for a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to get share link for"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"checkUrl":{"type":"string","format":"uri"},"editUrl":{"type":"string","format":"uri"},"viewUrl":{"type":"string","format":"uri"}},"required":["editUrl","viewUrl"],"additionalProperties":false,"nullable":true}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/enableShareLink":{"post":{"summary":"Enable share link for a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to enable share link for"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"checkUrl":{"type":"string","format":"uri"},"editUrl":{"type":"string","format":"uri"},"viewUrl":{"type":"string","format":"uri"}},"required":["editUrl","viewUrl"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/listBlocks":{"post":{"summary":"List top-level blocks in a project","tags":["Project"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project ID to list blocks for"},"limit":{"type":"number","default":100},"after":{"type":"string","description":"Cursor: block ID to get blocks after (do not combine with before)"},"before":{"type":"string","description":"Cursor: block ID to get blocks before (do not combine with after)"}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"completed":{"type":"boolean"}},"required":["id","completed"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listFolders":{"post":{"summary":"List folders in a workspace","tags":["Workspace"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1}},"required":["spaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listMedia":{"post":{"summary":"List media in a folder","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","minLength":1},"limit":{"type":"number","default":100},"page":{"type":"number","default":1}},"required":["folderId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Media"}],"nullable":true}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/listTemplates":{"post":{"summary":"List project templates in a folder","tags":["Workspace"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","minLength":1},"limit":{"type":"number","default":20},"page":{"type":"number","default":1}},"required":["folderId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ProjectTemplate"}],"nullable":true}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/importBundleZip":{"post":{"summary":"Import a ZIP/.tsk bundle into a workspace. Send the file as the raw request body with Content-Type: application/zip, application/octet-stream, or application/x-tsk. Pass workspaceId as a query parameter. Maximum file size: 50 MB.","tags":["Bundle"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"workspaceId","required":true,"description":"The target workspace ID to import the bundle into."}],"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/BundleInstallation"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/exportBundle":{"post":{"summary":"Export a space as a JSON bundle","tags":["Bundle"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"The space (subspace / app) ID to export."}},"required":["spaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"version":{"type":"string","enum":["1"],"description":"Bundle format version."},"items":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":true},"description":"Map of bundle items keyed by ID. Each item has a `type` field: space-bundle-flow-item, space-bundle-project-item, space-bundle-agent-item, space-bundle-template-item, space-bundle-media-item, space-bundle-app-item."}},"required":["version","items"],"additionalProperties":false,"description":"SpaceBundleData v1 — Workspace DNA bundle."}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/importBundle":{"post":{"summary":"Import a JSON bundle into a workspace","tags":["Bundle"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"description":"The target workspace ID to import the bundle into."},"bundleData":{"type":"object","properties":{"version":{"type":"string","enum":["1"],"description":"Bundle format version."},"items":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":true},"description":"Map of bundle items keyed by ID. Each item has a `type` field: space-bundle-flow-item, space-bundle-project-item, space-bundle-agent-item, space-bundle-template-item, space-bundle-media-item, space-bundle-app-item."}},"required":["version","items"],"additionalProperties":false,"description":"The Workspace DNA bundle to import (SpaceBundleData v1)."}},"required":["workspaceId","bundleData"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"$ref":"#/components/schemas/BundleInstallation"}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/bundles/{spaceId}/export/zip":{"get":{"summary":"Export a space as a ZIP bundle. Returns raw binary with appropriate headers.","tags":["Bundle"],"parameters":[{"schema":{"type":"string","enum":["zip","tsk"],"default":"zip"},"in":"query","name":"format","required":false,"description":"Export format: \"zip\" (default) or \"tsk\" (.tsk app kit)."},{"schema":{"type":"string","minLength":1},"in":"path","name":"spaceId","required":true,"description":"The space (subspace / app) ID to export."}],"responses":{"200":{"description":"Default Response"}}}},"/uploadMedia":{"post":{"summary":"Upload a media file to a space. Send the file as the raw request body with the appropriate Content-Type header. Pass spaceId and filename as query parameters. Maximum file size: 25 MB.","tags":["Media"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"spaceId","required":true,"description":"The space ID to upload media into (can be a root workspace or a subspace / app)."},{"schema":{"type":"string","minLength":1},"in":"query","name":"filename","required":true,"description":"Original filename of the uploaded file (e.g. \"photo.png\")."}],"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"mediaId":{"type":"string","description":"The SpaceMedia record ID (UUID)."},"fileId":{"type":"string","description":"The file ID used in S3."},"kind":{"type":"string","description":"Detected media kind (image, video, audio, document, etc.)."},"downloadUrl":{"type":"string","description":"Public URL to download the uploaded file."}},"required":["mediaId","fileId","kind","downloadUrl"],"additionalProperties":false}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/getMedia":{"post":{"summary":"Get media by ID","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mediaId":{"type":"string","minLength":1,"description":"The media ID to retrieve."}},"required":["mediaId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"item":{"allOf":[{"$ref":"#/components/schemas/Media"}],"nullable":true}},"required":["ok","item"],"additionalProperties":false}}}}}}},"/deleteMedia":{"post":{"summary":"Delete a media by ID","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mediaId":{"type":"string","minLength":1,"description":"The media ID to delete."}},"required":["mediaId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}}}}},"/media/{mediaId}/content":{"get":{"summary":"Download a media file by ID. Returns raw binary with appropriate headers.","tags":["Media"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"mediaId","required":true,"description":"The media ID to download."}],"responses":{"200":{"description":"Default Response"}}}},"/media/spaces/{spaceId}/content":{"get":{"summary":"Download all media files from a space as a ZIP archive. Each file is stored as {mediaId}/metadata.json and {mediaId}/original. Maximum 100 files per space.","tags":["Media"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"spaceId","required":true,"description":"The space ID to download all media from."}],"responses":{"200":{"description":"Default Response"}}}},"/listMyProjects":{"post":{"summary":"List my recently viewed projects","tags":["Me"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"number","default":100},"page":{"type":"number","default":1},"sort":{"type":"string","enum":["viewed-asc","viewed-desc"],"default":"viewed-desc"}},"additionalProperties":false,"nullable":true}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/subscribeWebhook":{"post":{"summary":"[Deprecated: use POST /webhooks] Subscribe to a webhook for a Taskade event (unsigned)","tags":["Webhook"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetUrl":{"type":"string","format":"uri"},"triggerType":{"type":"string","enum":["task.due","comment.created","task.assigned","project.created","project.assigned","project.joined"]}},"required":["targetUrl","triggerType"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"hookId":{"type":"string"}},"required":["ok","hookId"],"additionalProperties":false}}}}}}},"/unsubscribeWebhook":{"post":{"summary":"[Deprecated: use DELETE /webhooks/:id] Remove a previously-created webhook subscription","tags":["Webhook"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hookId":{"type":"string","minLength":1}},"required":["hookId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"deleted":{"type":"boolean"}},"required":["ok","deleted"],"additionalProperties":false}}}}}}},"/webhooks":{"post":{"summary":"Register a signed outbound webhook for one or more Taskade events","tags":["Webhook"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetUrl":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["task.due","comment.created","task.assigned","project.created","project.assigned","project.joined"]},"minItems":1},"spaceIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":100,"default":[]}},"required":["targetUrl","events"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"webhook":{"type":"object","properties":{"id":{"type":"string","format":"uri","description":"Endpoint id - the target URL (use URL-encoded as the :id path param)."},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["task.due","comment.created","task.assigned","project.created","project.assigned","project.joined"]}},"spaceIds":{"type":"array","items":{"type":"string"},"description":"Spaces this webhook is scoped to; empty = all spaces."},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","events","spaceIds","createdAt"],"additionalProperties":false},"secret":{"type":"string","description":"HMAC signing secret - shown once. Store it now."}},"required":["ok","webhook","secret"],"additionalProperties":false}}}}}},"get":{"summary":"List your registered outbound webhooks","tags":["Webhook"],"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uri","description":"Endpoint id - the target URL (use URL-encoded as the :id path param)."},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["task.due","comment.created","task.assigned","project.created","project.assigned","project.joined"]}},"spaceIds":{"type":"array","items":{"type":"string"},"description":"Spaces this webhook is scoped to; empty = all spaces."},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","events","spaceIds","createdAt"],"additionalProperties":false}}},"required":["ok","items"],"additionalProperties":false}}}}}}},"/webhooks/{id}":{"get":{"summary":"Get one registered outbound webhook by id (its URL-encoded target URL)","tags":["Webhook"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true,"description":"The webhook endpoint id (its URL-encoded target URL)."}],"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"webhook":{"type":"object","properties":{"id":{"type":"string","format":"uri","description":"Endpoint id - the target URL (use URL-encoded as the :id path param)."},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["task.due","comment.created","task.assigned","project.created","project.assigned","project.joined"]}},"spaceIds":{"type":"array","items":{"type":"string"},"description":"Spaces this webhook is scoped to; empty = all spaces."},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","events","spaceIds","createdAt"],"additionalProperties":false}},"required":["ok","webhook"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a registered outbound webhook by id (its URL-encoded target URL)","tags":["Webhook"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"id","required":true,"description":"The webhook endpoint id (its URL-encoded target URL)."}],"responses":{"200":{"description":"Default response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"deleted":{"type":"boolean"}},"required":["ok","deleted"],"additionalProperties":false}}}}}}}},"servers":[{"url":"https://www.taskade.com/api/v2","description":"Public API server"}],"security":[{"oAuthAuthorizationCode":[],"personalAccessToken":[]}]} \ No newline at end of file