/** * OpenAI function calling format tool definitions for Postiz MCP tools. * * These definitions can be used by GLM and other OpenAI-compatible adapters * to expose Postiz capabilities to their agents. */ export const POSTIZ_TOOLS = [ { type: "function" as const, function: { name: "postiz_list_channels", description: "List connected social media channels (Facebook, X, LinkedIn, etc.). Returns channel IDs, names, and platforms. Call this first to discover available channels.", parameters: { type: "object", properties: {}, required: [], }, }, }, { type: "function" as const, function: { name: "postiz_get_platform_schema", description: "Get platform-specific rules, max character limits, settings schema, and available sub-tools. MUST call before scheduling posts to understand platform constraints.", parameters: { type: "object", properties: { platform: { type: "string", description: "Platform name (twitter, linkedin, facebook, instagram, youtube, tiktok, pinterest, reddit, discord, slack, mastodon, bluesky, threads, dribbble)", }, isPremium: { type: "boolean", description: "Whether the integration is premium (affects character limits on some platforms like X). Set to false for standard accounts.", }, }, required: ["platform", "isPremium"], }, }, }, { type: "function" as const, function: { name: "postiz_trigger_tool", description: "Call platform-specific sub-tools. Examples: get Pinterest boards, YouTube tags, TikTok voice IDs. Use integrationSchema to discover available sub-tools first.", parameters: { type: "object", properties: { integrationId: { type: "string", description: "Integration/channel ID from postiz_list_channels", }, methodName: { type: "string", description: "Sub-tool method name (e.g., 'getBoards', 'getTags', 'getVoiceIds')", }, dataSchema: { type: "object", description: "Parameters for the sub-tool method", }, }, required: ["integrationId", "methodName"], }, }, }, { type: "function" as const, function: { name: "postiz_schedule_post", description: "Schedule or publish social media posts. Content must be HTML format using

, ,
,