diff --git a/extensions/msteams/src/channel.ts b/extensions/msteams/src/channel.ts index 00430996001..d8e3de68527 100644 --- a/extensions/msteams/src/channel.ts +++ b/extensions/msteams/src/channel.ts @@ -1,5 +1,6 @@ import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from"; import { collectAllowlistProviderRestrictSendersWarnings } from "openclaw/plugin-sdk/channel-policy"; +import { createMessageToolCardSchema } from "openclaw/plugin-sdk/channel-runtime"; import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime"; import type { ChannelMessageActionName, @@ -383,6 +384,15 @@ export const msteamsPlugin: ChannelPlugin = { ? (["cards"] as const) : []; }, + getToolSchema: ({ cfg }) => + cfg.channels?.msteams?.enabled !== false && + Boolean(resolveMSTeamsCredentials(cfg.channels?.msteams)) + ? { + properties: { + card: createMessageToolCardSchema(), + }, + } + : null, handleAction: async (ctx) => { // Handle send action with card parameter if (ctx.action === "send" && ctx.params.card) {