add_comment
Add comments to Codebeamer work items using plain text or wiki markup formats to document discussions and updates.
Instructions
Add a comment to a Codebeamer work item. Supports plain text and wiki markup formats. Returns the created comment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | Numeric item ID to comment on | |
| comment | Yes | Comment text | |
| format | No | Comment format: PlainText or Wiki markup | PlainText |
Implementation Reference
- src/tools/comments-write.ts:31-39 (handler)The tool handler for "add_comment", which calls the client's addComment method and formats the result.
async ({ itemId, comment, format }) => { const result = await client.addComment(itemId, { comment, commentFormat: format, }); return { content: [{ type: "text", text: formatComments([result]) }], }; }, - src/tools/comments-write.ts:10-40 (registration)Tool registration for "add_comment" in the McpServer.
server.registerTool( "add_comment", { title: "Add Comment", description: "Add a comment to a Codebeamer work item. " + "Supports plain text and wiki markup formats. " + "Returns the created comment.", inputSchema: { itemId: z .number() .int() .positive() .describe("Numeric item ID to comment on"), comment: z.string().min(1).describe("Comment text"), format: z .enum(["PlainText", "Wiki"]) .default("PlainText") .describe("Comment format: PlainText or Wiki markup"), }, }, async ({ itemId, comment, format }) => { const result = await client.addComment(itemId, { comment, commentFormat: format, }); return { content: [{ type: "text", text: formatComments([result]) }], }; }, ); - src/tools/comments-write.ts:18-29 (schema)Zod schema definition for the input parameters of "add_comment".
inputSchema: { itemId: z .number() .int() .positive() .describe("Numeric item ID to comment on"), comment: z.string().min(1).describe("Comment text"), format: z .enum(["PlainText", "Wiki"]) .default("PlainText") .describe("Comment format: PlainText or Wiki markup"), },