Skip to main content
Glama
TykanN

Swit MCP Server

by TykanN

swit-message-comment-create

Add a comment to a specific message in a Swit workspace. Provide the message ID and comment content.

Instructions

Create comment on message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYes
contentYes
body_typeNoplain
assetsNo
external_asset_typeNo

Implementation Reference

  • Handler function that validates args with MessageCommentCreateArgsSchema and delegates to switClient.createMessageComment()
    export const handleMessageCommentCreate = async (switClient: SwitClient, args: any) => {
      const validatedArgs = MessageCommentCreateArgsSchema.parse(args);
      return await switClient.createMessageComment(validatedArgs);
    };
  • Zod schema defining input arguments: message_id (string), content (string), body_type (enum: plain/markdown, default plain), assets (optional record), external_asset_type (optional string)
    export const MessageCommentCreateArgsSchema = z.object({
      message_id: z.string(),
      content: z.string(),
      body_type: z.enum(['plain', 'markdown']).default('plain').optional(),
      assets: z.record(z.any()).optional(),
      external_asset_type: z.string().optional(),
    });
  • Zod schema defining the response shape: data.comment with fields comment_id, user_id, user_name, content, created, assets
    export const MessageCommentCreateResponseSchema = z.object({
      data: z.object({
        comment: MessageCommentSchema,
      }),
    });
  • Tool registration with name 'swit-message-comment-create', description 'Create comment on message', and inputSchema derived from MessageCommentCreateArgsSchema
    {
      name: 'swit-message-comment-create',
      description: 'Create comment on message',
      inputSchema: zodToJsonSchema(MessageCommentCreateArgsSchema),
    },
  • Map registration linking tool name 'swit-message-comment-create' to a closure that calls handleMessageCommentCreate with the initialized SwitClient
    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),
    });
  • SwitClient method that sends a POST request to /api/message.comment.create with validated args and returns the response data
    async createMessageComment(
      args: MessageCommentCreateArgs
    ): Promise<MessageCommentCreateResponse> {
      const response = await this.client.post('/api/message.comment.create', args);
      return response.data;
    }
  • src/index.ts:109-109 (registration)
    Main entry point: toolHandlers is populated with coreHandlers (which includes the swit-message-comment-create mapping) during initialization
    toolHandlers = { ...oauthHandlers(oauthWebServer), ...coreHandlers(switClient) };
Behavior2/5

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

The description only says 'Create', implying mutation, but provides no details on side effects (e.g., notifications, idempotency, error behavior). With no annotations, more disclosure is needed.

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

Conciseness3/5

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

The description is concise but too brief for the tool's complexity. It lacks structure and does not prioritize key information like required vs optional parameters.

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 no annotations and no output schema, the description is severely incomplete. It fails to document parameter meanings, behavioral details, or return values.

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 adds no meaning to the 5 parameters. Schema coverage is 0%, and the description does not explain fields like 'assets', 'external_asset_type', or the expected format of 'content'.

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 clearly states the action 'Create comment on message' and distinguishes from the sibling 'swit-message-comment-list'. It is specific to creating a comment resource.

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 guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, constraints (e.g., message must exist), or when not to use it.

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