list_ai_actions
Retrieve and filter AI actions (prompts) by owner type or workspace ID within the Carbon Voice platform. Supports user, workspace, and system-level filtering for targeted results.
Instructions
List AI Actions (Prompts). Optionally, you can filter by owner type and workspace id. Filtering by owner type, Possible values: "user", "workspace", "system". Do not use unless the user explicitly requests it.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner_type | No | ||
| workspace_id | No |
Implementation Reference
- src/server.ts:830-859 (handler)Registration and inline handler for the 'list_ai_actions' MCP tool. The handler takes input params, authenticates with the user's token, calls the backend API via simplifiedApi.aIPromptControllerGetPrompts, and formats the response for MCP compliance.server.registerTool( 'list_ai_actions', { description: 'List AI Actions (Prompts). Optionally, you can filter by owner type and workspace id. ' + 'Filtering by owner type, Possible values: "user", "workspace", "system". ' + 'Do not use unless the user explicitly requests it.', inputSchema: aIPromptControllerGetPromptsQueryParams.shape, annotations: { readOnlyHint: true, destructiveHint: false, }, }, async ( args: AIPromptControllerGetPromptsParams, { authInfo }, ): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.aIPromptControllerGetPrompts( args, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error listing ai actions:', { error }); return formatToMCPToolResponse(error); } }, );
- Zod input schema for the list_ai_actions tool, defining optional parameters owner_type (enum: 'user', 'workspace', 'system') and workspace_id (string). Used in server.ts registration.export const aIPromptControllerGetPromptsQueryParams = zod.object({ "owner_type": zod.enum(['user', 'workspace', 'system']).optional(), "workspace_id": zod.string().optional() })