Skip to content

Commit 6178033

Browse files
fix: update pageURL parameter type to Array<string> for accessibility scan function
1 parent 4ff6ffc commit 6178033

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/tools/accessibility.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ const reportFetcher = new AccessibilityReportFetcher();
1111

1212
async function runAccessibilityScan(
1313
name: string,
14-
pageURL: string,
14+
pageURL: Array<string>,
1515
context: any,
1616
): Promise<CallToolResult> {
1717
// Start scan
18-
const startResp = await scanner.startScan(name, [pageURL]);
18+
const startResp = await scanner.startScan(name, pageURL);
1919
const scanId = startResp.data!.id;
2020
const scanRunId = startResp.data!.scanRunId;
2121

@@ -48,7 +48,8 @@ async function runAccessibilityScan(
4848
// Fetch CSV report link
4949
const reportLink = await reportFetcher.getReportLink(scanId, scanRunId);
5050

51-
const { records, next_page } = await parseAccessibilityReportFromCSV(reportLink);
51+
const { records, next_page } =
52+
await parseAccessibilityReportFromCSV(reportLink);
5253

5354
return {
5455
content: [
@@ -70,7 +71,9 @@ export default function addAccessibilityTools(server: McpServer) {
7071
"Start an accessibility scan via BrowserStack and retrieve a local CSV report path.",
7172
{
7273
name: z.string().describe("Name of the accessibility scan"),
73-
pageURL: z.string().describe("The URL to scan for accessibility issues"),
74+
pageURL: z
75+
.array(z.string())
76+
.describe("The URL to scan for accessibility issues"),
7477
},
7578
async (args, context) => {
7679
try {

0 commit comments

Comments
 (0)