AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
import { createAction } from '@activepieces/pieces-framework';
import { cmsAuth } from '../auth';
import { totalcmsApi } from '../common/client';
import { totalcmsOutputSchemas } from '../output-schemas';
export const listCollectionsAction = createAction({
name: 'list_collections',
classification: 'SEARCH',
auth: cmsAuth,
displayName: 'List Collections',
description: 'Lists all collections on the site.',
audience: 'both',
aiMetadata: {
description:
'Lists every Total CMS collection on the site with its ID, schema (blog, text, image and so on) and object count. Call it first to find the collection ID other actions need. Read-only and safe to retry.',
idempotent: true,
},
props: {},
outputSchema: totalcmsOutputSchemas.collections,
async run(context) {
const collections = await totalcmsApi.listCollections({ auth: context.auth });
return { collections, count: collections.length };
},
});