Skip to content

Commit fc77293

Browse files
committed
fix: add core web vitals to performance_start_trace description
Fixes #124 and #159. People have reported that when asked for CWV metrics, the AI will use `evaluate_script` to inject some code into the page to gather them. But, we want to encourage it to record a trace instead and use those values. After some testing locally, adding CWV explicitly to the description makes it much more reliable that the AI will reach for trace recording when asked about CWVs.
1 parent 22ec7ee commit fc77293

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tools/performance.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ import {defineTool} from './ToolDefinition.js';
2222

2323
export const startTrace = defineTool({
2424
name: 'performance_start_trace',
25-
description: 'Starts a performance trace recording on the selected page.',
25+
description:
26+
'Starts a performance trace recording on the selected page. This can be used to look for performance problems and insights to improve the performance of the page. It will also report Core Web Vital (CWV) scores for the page.',
2627
annotations: {
2728
category: ToolCategories.PERFORMANCE,
2829
readOnlyHint: true,
@@ -31,7 +32,7 @@ export const startTrace = defineTool({
3132
reload: z
3233
.boolean()
3334
.describe(
34-
'Determines if, once tracing has started, the page should be automatically reloaded',
35+
'Determines if, once tracing has started, the page should be automatically reloaded.',
3536
),
3637
autoStop: z
3738
.boolean()

0 commit comments

Comments
 (0)