File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -517,18 +517,21 @@ export class LinearService {
517517 }
518518 }
519519
520- async createComment ( args : { issueId : string ; body : string } ) {
520+ async createComment ( args : { issueId : string ; body : string ; parentId ?: string } ) {
521521 const createdComment = await this . client . createComment ( {
522522 issueId : args . issueId ,
523523 body : args . body ,
524+ parentId : args . parentId ,
524525 } ) ;
525526
526527 if ( createdComment . success && createdComment . comment ) {
527528 const commentData = await createdComment . comment ;
529+ const parent = commentData . parent ? await commentData . parent : null ;
528530 return {
529531 id : commentData . id ,
530532 body : commentData . body ,
531533 url : commentData . url ,
534+ parentId : parent ?. id ,
532535 } ;
533536 } else {
534537 throw new Error ( 'Failed to create comment' ) ;
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ export const updateIssueToolDefinition: MCPToolDefinition = {
367367 */
368368export const createCommentToolDefinition : MCPToolDefinition = {
369369 name : 'linear_createComment' ,
370- description : 'Add a comment to an issue in Linear' ,
370+ description : 'Add a comment to an issue in Linear (supports threaded replies) ' ,
371371 input_schema : {
372372 type : 'object' ,
373373 properties : {
@@ -379,6 +379,10 @@ export const createCommentToolDefinition: MCPToolDefinition = {
379379 type : 'string' ,
380380 description : 'Text of the comment (Markdown supported)' ,
381381 } ,
382+ parentId : {
383+ type : 'string' ,
384+ description : 'ID of the parent comment to reply to (for threaded comments)' ,
385+ } ,
382386 } ,
383387 required : [ 'issueId' , 'body' ] ,
384388 } ,
@@ -388,6 +392,7 @@ export const createCommentToolDefinition: MCPToolDefinition = {
388392 id : { type : 'string' } ,
389393 body : { type : 'string' } ,
390394 url : { type : 'string' } ,
395+ parentId : { type : 'string' } ,
391396 } ,
392397 } ,
393398} ;
Original file line number Diff line number Diff line change @@ -187,14 +187,16 @@ export function isUpdateIssueArgs(args: unknown): args is {
187187export function isCreateCommentArgs ( args : unknown ) : args is {
188188 issueId : string ;
189189 body : string ;
190+ parentId ?: string ;
190191} {
191192 return (
192193 typeof args === 'object' &&
193194 args !== null &&
194195 'issueId' in args &&
195196 typeof ( args as { issueId : string } ) . issueId === 'string' &&
196197 'body' in args &&
197- typeof ( args as { body : string } ) . body === 'string'
198+ typeof ( args as { body : string } ) . body === 'string' &&
199+ ( ! ( 'parentId' in args ) || typeof ( args as { parentId : string } ) . parentId === 'string' )
198200 ) ;
199201}
200202
You can’t perform that action at this time.
0 commit comments