Skip to main content
Glama
files.ts757 B
import { SlackClientWrapper } from '../utils/slack-client.js'; import { uploadFileSchema } from '../utils/validators.js'; export async function uploadFile(client: SlackClientWrapper, args: unknown) { const params = uploadFileSchema.parse(args); return await client.safeCall(async () => { const result = await client.getClient().files.uploadV2({ channels: params.channels.join(','), content: params.content, filename: params.filename, title: params.title, initial_comment: params.initial_comment, }); const maybeFile = (result && typeof result === 'object' && 'file' in result) ? (result as { file?: unknown }).file : undefined; return { ok: true, file: maybeFile, }; }); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hais/slack-bot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server