11import { describe , it , expect } from 'vitest' ;
22import { getAllMcpTools } from '../src/mcp' ;
33import { withTrace } from '../src/tracing' ;
4- import { NodeMCPServerStdio } from '../src/shims/mcp-stdio /node' ;
4+ import { NodeMCPServerStdio } from '../src/shims/mcp-server /node' ;
55import type { CallToolResultContent } from '../src/mcp' ;
66
77class StubServer extends NodeMCPServerStdio {
@@ -20,7 +20,10 @@ class StubServer extends NodeMCPServerStdio {
2020 this . _toolsList = this . toolList ;
2121 return this . toolList ;
2222 }
23- async callTool ( _toolName : string , _args : Record < string , unknown > | null ) : Promise < CallToolResultContent > {
23+ async callTool (
24+ _toolName : string ,
25+ _args : Record < string , unknown > | null ,
26+ ) : Promise < CallToolResultContent > {
2427 return [ ] ;
2528 }
2629}
@@ -29,10 +32,18 @@ describe('MCP tools cache invalidation', () => {
2932 it ( 'fetches fresh tools after cache invalidation' , async ( ) => {
3033 await withTrace ( 'test' , async ( ) => {
3134 const toolsA = [
32- { name : 'a' , description : '' , inputSchema : { type : 'object' , properties : { } } } ,
35+ {
36+ name : 'a' ,
37+ description : '' ,
38+ inputSchema : { type : 'object' , properties : { } } ,
39+ } ,
3340 ] ;
3441 const toolsB = [
35- { name : 'b' , description : '' , inputSchema : { type : 'object' , properties : { } } } ,
42+ {
43+ name : 'b' ,
44+ description : '' ,
45+ inputSchema : { type : 'object' , properties : { } } ,
46+ } ,
3647 ] ;
3748 const server = new StubServer ( 'server' , toolsA ) ;
3849
0 commit comments