Skip to content

Commit 7b68e28

Browse files
committed
Prettier formatting
1 parent d01e8de commit 7b68e28

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

mcp-client-typescript/index.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

mcp-client-typescript/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
},
1313
"include": ["index.ts"],
1414
"exclude": ["node_modules"]
15-
}
15+
}

0 commit comments

Comments
 (0)