Skip to main content
Glama
TykanN

Swit MCP Server

by TykanN

swit-message-create

Send a message to a Swit channel, supporting plain text or markdown content, assets, and attachments.

Instructions

Send message to channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
contentNo
body_typeNoplain
assetsNo
attachmentsNo
external_asset_typeNo

Implementation Reference

  • Handler function that parses args with MessageCreateArgsSchema and calls switClient.createMessage()
    export const handleMessageCreate = async (switClient: SwitClient, args: any) => {
      const validatedArgs = MessageCreateArgsSchema.parse(args);
      return await switClient.createMessage(validatedArgs);
    };
  • Zod schema defining input args: channel_id (required), content, body_type, assets, attachments, external_asset_type
    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(),
    });
  • Tool registration with name 'swit-message-create', description, and input schema
    {
      name: 'swit-message-create',
      description: 'Send message to channel',
      inputSchema: zodToJsonSchema(MessageCreateArgsSchema),
    },
  • SwitClient.createMessage() sends POST to /api/message.create with the validated args
    async createMessage(args: MessageCreateArgs): Promise<MessageCreateResponse> {
      const response = await this.client.post('/api/message.create', args);
      return response.data;
    }
  • Handler registration mapping 'swit-message-create' string to handleMessageCreate function via coreHandlers factory
      '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),
    });
Behavior1/5

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

No annotations are provided, and the description lacks any behavioral information such as side effects, authentication needs, idempotency, or error scenarios. For a mutation tool, this is insufficient.

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

Conciseness2/5

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

The description is minimal at 4 words but sacrifices completeness. For a tool with multiple parameters and complex behavior, it is under-specified, not optimally concise.

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

Completeness1/5

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

Given the 6 parameters, lack of output schema, and no annotations, the description is severely incomplete. It fails to provide enough context for the agent to understand the tool's full behavior and requirements.

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

Parameters1/5

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

The description does not explain any parameters. With 6 parameters and 0% schema description coverage, the agent must rely solely on parameter names, which are not descriptive (e.g., 'assets', 'attachments'). No additional meaning is provided.

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 verb and resource, distinguishing it from siblings like 'swit-message-comment-create' which deals with comments. However, it could be more specific about the type of message or context.

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?

No usage guidelines are provided. The description does not specify when to use this tool versus alternatives, nor does it mention any prerequisites or exclusions. The agent receives no guidance on context.

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