Skip to content

Commit 438f6f4

Browse files
committed
chore: 🧹 cleanup
1 parent 9e8cf5f commit 438f6f4

File tree

1 file changed

+3
-36
lines changed

1 file changed

+3
-36
lines changed

src/index.ts

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ const server = new McpServer({
1919
instructions: `
2020
This server provides tools for Solidity developers using the Foundry toolkit:
2121
- forge: Smart contract development framework
22-
- cast: Ethereum RPC client and utility tool
23-
- anvil: Local Ethereum test node
22+
- cast: EVM nodes RPC client and utility tool
23+
- anvil: Local EVM test node
2424
25-
You can interact with local or remote Ethereum nodes, deploy contracts, perform common operations, and analyze smart contract code.
25+
You can interact with local or remote EVM chains, deploy contracts, perform common operations, and analyze smart contract code.
2626
`
2727
});
2828

@@ -240,7 +240,6 @@ server.tool(
240240

241241
const result = await executeCommand(command);
242242

243-
// Check if we need to format the output better
244243
let formattedOutput = result.message;
245244
if (result.success) {
246245
// Try to detect arrays and format them better
@@ -990,35 +989,6 @@ server.tool(
990989
}
991990
);
992991

993-
// Tool: Generate a new wallet
994-
server.tool(
995-
"generate_wallet",
996-
"Generate a new Ethereum wallet (private key and address)",
997-
{},
998-
async () => {
999-
const installed = await checkFoundryInstalled();
1000-
if (!installed) {
1001-
return {
1002-
content: [{ type: "text", text: FOUNDRY_NOT_INSTALLED_ERROR }],
1003-
isError: true
1004-
};
1005-
}
1006-
1007-
const command = `${castPath} wallet new`;
1008-
const result = await executeCommand(command);
1009-
1010-
return {
1011-
content: [{
1012-
type: "text",
1013-
text: result.success
1014-
? `New wallet generated:\n${result.message}`
1015-
: `Failed to generate wallet: ${result.message}`
1016-
}],
1017-
isError: !result.success
1018-
};
1019-
}
1020-
);
1021-
1022992
// Tool: Calculate contract address
1023993
server.tool(
1024994
"compute_address",
@@ -1195,7 +1165,6 @@ server.tool(
11951165
const workspace = await ensureWorkspaceInitialized();
11961166
const fullFilePath = path.join(workspace, filePath);
11971167

1198-
// Check if file exists
11991168
const fileExists = await fs.access(fullFilePath).then(() => true).catch(() => false);
12001169
if (fileExists && !overwrite) {
12011170
return {
@@ -1207,10 +1176,8 @@ server.tool(
12071176
};
12081177
}
12091178

1210-
// Ensure directory exists
12111179
await fs.mkdir(path.dirname(fullFilePath), { recursive: true });
12121180

1213-
// Write the file
12141181
await fs.writeFile(fullFilePath, content);
12151182

12161183
return {

0 commit comments

Comments
 (0)