@@ -18,7 +18,7 @@ const throttlingOptions: [string, ...string[]] = [
1818
1919export const emulate = defineTool ( {
2020 name : 'emulate' ,
21- description : `Emulates various features on the selected page .` ,
21+ description : `Emulates various features.` ,
2222 annotations : {
2323 category : ToolCategory . EMULATION ,
2424 readOnlyHint : false ,
@@ -28,16 +28,14 @@ export const emulate = defineTool({
2828 . enum ( throttlingOptions )
2929 . optional ( )
3030 . describe (
31- `Throttle network. Set to "No emulation" to disable. If omitted, conditions remain unchanged.` ,
31+ `Throttle network. "No emulation" to disable. Omit to keep unchanged.` ,
3232 ) ,
3333 cpuThrottlingRate : zod
3434 . number ( )
3535 . min ( 1 )
3636 . max ( 20 )
3737 . optional ( )
38- . describe (
39- 'Represents the CPU slowdown factor. Set the rate to 1 to disable throttling. If omitted, throttling remains unchanged.' ,
40- ) ,
38+ . describe ( 'CPU slowdown factor. 1 to disable. Omit to keep unchanged.' ) ,
4139 geolocation : zod
4240 . object ( {
4341 latitude : zod
@@ -53,55 +51,41 @@ export const emulate = defineTool({
5351 } )
5452 . nullable ( )
5553 . optional ( )
56- . describe (
57- 'Geolocation to emulate. Set to null to clear the geolocation override.' ,
58- ) ,
54+ . describe ( 'Geolocation to emulate. null to clear override.' ) ,
5955 userAgent : zod
6056 . string ( )
6157 . nullable ( )
6258 . optional ( )
63- . describe (
64- 'User agent to emulate. Set to null to clear the user agent override.' ,
65- ) ,
59+ . describe ( 'User agent to emulate. null to clear override.' ) ,
6660 colorScheme : zod
6761 . enum ( [ 'dark' , 'light' , 'auto' ] )
6862 . optional ( )
69- . describe (
70- 'Emulate the dark or the light mode. Set to "auto" to reset to the default.' ,
71- ) ,
63+ . describe ( 'Emulate dark or light mode. "auto" to reset.' ) ,
7264 viewport : zod
7365 . object ( {
74- width : zod . number ( ) . int ( ) . min ( 0 ) . describe ( 'Page width in pixels .' ) ,
75- height : zod . number ( ) . int ( ) . min ( 0 ) . describe ( 'Page height in pixels .' ) ,
66+ width : zod . number ( ) . int ( ) . min ( 0 ) . describe ( 'Page width (px) .' ) ,
67+ height : zod . number ( ) . int ( ) . min ( 0 ) . describe ( 'Page height (px) .' ) ,
7668 deviceScaleFactor : zod
7769 . number ( )
7870 . min ( 0 )
7971 . optional ( )
80- . describe ( 'Specify device scale factor (can be thought of as dpr).' ) ,
72+ . describe ( 'Device scale factor (dpr).' ) ,
8173 isMobile : zod
8274 . boolean ( )
8375 . optional ( )
84- . describe (
85- 'Whether the meta viewport tag is taken into account. Defaults to false.' ,
86- ) ,
76+ . describe ( 'Use meta viewport tag. Default: false.' ) ,
8777 hasTouch : zod
8878 . boolean ( )
8979 . optional ( )
90- . describe (
91- 'Specifies if viewport supports touch events. This should be set to true for mobile devices.' ,
92- ) ,
80+ . describe ( 'Viewport supports touch. true for mobile.' ) ,
9381 isLandscape : zod
9482 . boolean ( )
9583 . optional ( )
96- . describe (
97- 'Specifies if viewport is in landscape mode. Defaults to false.' ,
98- ) ,
84+ . describe ( 'Landscape mode. Default: false.' ) ,
9985 } )
10086 . nullable ( )
10187 . optional ( )
102- . describe (
103- 'Viewport to emulate. Set to null to reset to the default viewport.' ,
104- ) ,
88+ . describe ( 'Viewport to emulate. null to reset.' ) ,
10589 } ,
10690 handler : async ( request , _response , context ) => {
10791 await context . emulate ( request . params ) ;
0 commit comments