Skip to content

Commit 8fe398e

Browse files
authored
fix: handle missing third-party tool toolGroup description gracefully (ChromeDevTools#2224)
Angular's third-party tools currently do not provide a description of the toolGroup, only of the individual tools. We don't want to fail in this case.
1 parent 163a581 commit 8fe398e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/McpResponse.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ async function getToolGroups(page: McpPage): Promise<ToolGroups> {
130130

131131
if (
132132
typeof toolGroup.name !== 'string' ||
133-
typeof toolGroup.description !== 'string' ||
133+
(toolGroup.description &&
134+
typeof toolGroup.description !== 'string') ||
134135
!Array.isArray(toolGroup.tools)
135136
) {
136137
console.error('Invalid toolGroup:', toolGroup);

0 commit comments

Comments
 (0)