File tree 1 file changed +20
-0
lines changed
packages/mcp-server-supabase/src
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -598,4 +598,24 @@ describe('tools', () => {
598
598
599
599
await expect ( run ( ) ) . rejects . toThrow ( 'syntax error at or near "invalid"' ) ;
600
600
} ) ;
601
+
602
+ // We use snake_case because it aligns better with most MCP clients
603
+ test ( 'all tools follow snake_case naming convention' , async ( ) => {
604
+ const { client } = await setup ( ) ;
605
+
606
+ const { tools } = await client . listTools ( ) ;
607
+
608
+ for ( const tool of tools ) {
609
+ expect ( tool . name , 'expected tool name to be snake_case' ) . toMatch (
610
+ / ^ [ a - z 0 - 9 _ ] + $ /
611
+ ) ;
612
+
613
+ const parameterNames = Object . keys ( tool . inputSchema . properties ?? { } ) ;
614
+ for ( const name of parameterNames ) {
615
+ expect ( name , 'expected parameter to be snake_case' ) . toMatch (
616
+ / ^ [ a - z 0 - 9 _ ] + $ /
617
+ ) ;
618
+ }
619
+ }
620
+ } ) ;
601
621
} ) ;
You can’t perform that action at this time.
0 commit comments