Skip to main content
Glama
TykanN

Swit MCP Server

by TykanN

swit-message-create

Send messages to Swit channels with text content, attachments, and formatting options to communicate within team workspaces.

Instructions

Send message to channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
contentNo
body_typeNoplain
assetsNo
attachmentsNo
external_asset_typeNo

Implementation Reference

  • The main handler function for 'swit-message-create' tool. Validates input arguments using MessageCreateArgsSchema and delegates to SwitClient.createMessage.
    export const handleMessageCreate = async (switClient: SwitClient, args: any) => {
      const validatedArgs = MessageCreateArgsSchema.parse(args);
      return await switClient.createMessage(validatedArgs);
    };
  • Zod schema defining the input arguments for the message create tool.
    export const MessageCreateArgsSchema = z.object({
      channel_id: z.string(),
      content: z.string().optional(),
      body_type: z.enum(['plain', 'markdown']).default('plain').optional(),
      assets: z.array(z.any()).optional(),
      attachments: z.record(z.any()).optional(),
      external_asset_type: z.string().optional(),
    });
  • MCP tool definition including name, description, and input schema derived from MessageCreateArgsSchema.
    {
      name: 'swit-message-create',
      description: 'Send message to channel',
      inputSchema: zodToJsonSchema(MessageCreateArgsSchema),
    },
  • Factory function that registers the 'swit-message-create' handler along with other core handlers.
    export const coreHandlers = (switClient: SwitClient) => ({
      'swit-workspace-list': (args: any) => handleWorkspaceList(switClient, args),
      'swit-channel-list': (args: any) => handleChannelList(switClient, args),
      'swit-message-create': (args: any) => handleMessageCreate(switClient, args),
      'swit-message-comment-create': (args: any) => handleMessageCommentCreate(switClient, args),
      'swit-message-comment-list': (args: any) => handleMessageCommentList(switClient, args),
      'swit-project-list': (args: any) => handleProjectList(switClient, args),
    });
  • src/index.ts:109-109 (registration)
    Final registration of coreHandlers (including swit-message-create) into the MCP toolHandlers dictionary.
    toolHandlers = { ...oauthHandlers(oauthWebServer), ...coreHandlers(switClient) };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'send message' implies a write operation, it doesn't disclose permissions required, rate limits, whether messages are editable/deletable after sending, or what happens with failed sends. The description lacks essential behavioral context for a message creation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is maximally concise with just three words that directly convey the core function. There's zero waste or unnecessary elaboration, making it easy to parse while communicating the essential purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a message creation tool with 6 parameters, 0% schema description coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns, how to handle the complex parameters like arrays and objects, or provide any behavioral context needed for proper tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for 6 parameters, the description provides no parameter information beyond what's implied by the tool name. It doesn't explain what 'channel_id' refers to, what 'content' should contain, the meaning of 'body_type' enum values, what 'assets' or 'attachments' arrays/objects should contain, or what 'external_asset_type' is for.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Send message to channel' clearly states the action (send) and target resource (message to channel), providing a specific verb+resource combination. However, it doesn't distinguish this from sibling tools like 'swit-message-comment-create' which also sends content to channels but as comments rather than messages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when to choose this over 'swit-message-comment-create' for comments, nor any prerequisites or contextual constraints for sending messages to channels.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/TykanN/swit-mcp'

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