@@ -34,7 +34,7 @@ class MCPClient {
3434 async connectToServer ( serverScriptPath : string ) {
3535 /**
3636 * Connect to an MCP server
37- *
37+ *
3838 * @param serverScriptPath - Path to the server script (.py or .js)
3939 */
4040 try {
@@ -68,7 +68,7 @@ class MCPClient {
6868 } ) ;
6969 console . log (
7070 "Connected to server with tools:" ,
71- this . tools . map ( ( { name } ) => name )
71+ this . tools . map ( ( { name } ) => name ) ,
7272 ) ;
7373 } catch ( e ) {
7474 console . log ( "Failed to connect to MCP server: " , e ) ;
@@ -79,7 +79,7 @@ class MCPClient {
7979 async processQuery ( query : string ) {
8080 /**
8181 * Process a query using Claude and available tools
82- *
82+ *
8383 * @param query - The user's input query
8484 * @returns Processed response as a string
8585 */
@@ -90,7 +90,6 @@ class MCPClient {
9090 } ,
9191 ] ;
9292
93-
9493 // Initial Claude API call
9594 const response = await this . anthropic . messages . create ( {
9695 model : "claude-3-5-sonnet-20241022" ,
@@ -117,7 +116,7 @@ class MCPClient {
117116 } ) ;
118117 toolResults . push ( result ) ;
119118 finalText . push (
120- `[Calling tool ${ toolName } with args ${ JSON . stringify ( toolArgs ) } ]`
119+ `[Calling tool ${ toolName } with args ${ JSON . stringify ( toolArgs ) } ]` ,
121120 ) ;
122121
123122 // Continue conversation with tool results
@@ -134,7 +133,7 @@ class MCPClient {
134133 } ) ;
135134
136135 finalText . push (
137- response . content [ 0 ] . type === "text" ? response . content [ 0 ] . text : ""
136+ response . content [ 0 ] . type === "text" ? response . content [ 0 ] . text : "" ,
138137 ) ;
139138 }
140139 }
0 commit comments