Skip to content

Commit 53e171f

Browse files
Update src/core/tools/UseMcpToolTool.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 988b3d9 commit 53e171f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/core/tools/UseMcpToolTool.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ export class UseMcpToolTool extends BaseTool<"use_mcp_tool"> {
283283
return ""
284284
}
285285
if (item.type === "resource_link") {
286+
if (typeof item.name !== "string" || typeof item.uri !== "string") {
287+
return ""
288+
}
286289
const parts = [`Resource Link: ${item.name} (${item.uri})`]
287290
if (item.description) {
288291
parts.push(` Description: ${item.description}`)

0 commit comments

Comments
 (0)