@@ -289,21 +289,27 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
289289 const args = issues . ListIssuesOptionsSchema . parse ( request . params . arguments ) ;
290290 const { owner, repo, ...options } = args ;
291291 const result = await issues . listIssues ( owner , repo , options ) ;
292- return { toolResult : result } ;
292+ return {
293+ content : [ { type : "text" , text : JSON . stringify ( result , null , 2 ) } ] ,
294+ } ;
293295 }
294296
295297 case "update_issue" : {
296298 const args = issues . UpdateIssueOptionsSchema . parse ( request . params . arguments ) ;
297299 const { owner, repo, issue_number, ...options } = args ;
298300 const result = await issues . updateIssue ( owner , repo , issue_number , options ) ;
299- return { toolResult : result } ;
301+ return {
302+ content : [ { type : "text" , text : JSON . stringify ( result , null , 2 ) } ] ,
303+ } ;
300304 }
301305
302306 case "add_issue_comment" : {
303307 const args = issues . IssueCommentSchema . parse ( request . params . arguments ) ;
304308 const { owner, repo, issue_number, body } = args ;
305309 const result = await issues . addIssueComment ( owner , repo , issue_number , body ) ;
306- return { toolResult : result } ;
310+ return {
311+ content : [ { type : "text" , text : JSON . stringify ( result , null , 2 ) } ] ,
312+ } ;
307313 }
308314
309315 case "list_commits" : {
@@ -323,7 +329,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
323329 case "get_issue" : {
324330 const args = issues . GetIssueSchema . parse ( request . params . arguments ) ;
325331 const issue = await issues . getIssue ( args . owner , args . repo , args . issue_number ) ;
326- return { toolResult : issue } ;
332+ return {
333+ content : [ { type : "text" , text : JSON . stringify ( issue , null , 2 ) } ] ,
334+ } ;
327335 }
328336
329337 default :
0 commit comments