You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: `Execute LLM-generated code safely in YepCode’s secure, production-grade sandboxes.
210
-
This tool is ideal when your AI agent needs to handle tasks that don’t have a predefined tool available — but could be solved by writing and running a custom script.
211
-
212
-
It supports external dependencies (NPM or PyPI), so it’s perfect for:
213
-
• Complex data transformations
214
-
• API calls to services not yet integrated
215
-
• Custom logic implementations
216
-
• One-off utility scripts
217
-
218
-
Tip: First try to find a tool that matches your task, but if not available, try generating the code and running it here!`,
"Set a YepCode environment variable to be available for future code executions",
227
-
inputSchema: zodToJsonSchema(SetEnvVarSchema),
228
-
},
229
-
{
230
-
name: "remove_env_var",
231
-
description: "Remove a YepCode environment variable",
232
-
inputSchema: zodToJsonSchema(RemoveEnvVarSchema),
233
-
},
234
-
{
235
-
name: "get_execution",
236
-
description:
237
-
"Get the status, result, logs, timeline, etc. of a YepCode execution",
238
-
inputSchema: zodToJsonSchema(GetExecutionSchema),
239
-
},
240
-
];
232
+
consttools=[
233
+
{
234
+
name: "set_env_var",
235
+
title: "Set environment variable",
236
+
description:
237
+
"Set a YepCode environment variable to be available for future code executions",
238
+
inputSchema: zodToJsonSchema(SetEnvVarSchema),
239
+
},
240
+
{
241
+
name: "remove_env_var",
242
+
title: "Remove environment variable",
243
+
description: "Remove a YepCode environment variable",
244
+
inputSchema: zodToJsonSchema(RemoveEnvVarSchema),
245
+
},
246
+
{
247
+
name: "get_execution",
248
+
title: "Get process execution",
249
+
description:
250
+
"Get the status, result, logs, timeline, etc. of a YepCode execution",
251
+
inputSchema: zodToJsonSchema(GetExecutionSchema),
252
+
},
253
+
...storageToolDefinitions,
254
+
];
255
+
256
+
if(!this.disableRunCodeTool){
257
+
constenvVars=awaitthis.yepCodeEnv.getEnvVars();
258
+
constcodingRules=awaitthis.getCodingRules();
259
+
tools.push({
260
+
name: "run_code",
261
+
title:
262
+
"Execute LLM-generated code in YepCode’s remote and secure sandboxes",
263
+
description: `This tool is ideal when your AI agent needs to handle tasks that don’t have a predefined tool available — but could be solved by writing and running a custom script.
264
+
265
+
It supports JavaScript and Python, both with external dependencies (NPM or PyPI), so it’s perfect for:
266
+
* Complex data transformations
267
+
* API calls to services not yet integrated
268
+
* Custom logic implementations
269
+
* One-off utility scripts
270
+
* To use files as input, first upload them to YepCode Storage using the upload storage MCP tools. Then, access them in your code using the \`yepcode.storage\` helper methods to download the files.
271
+
* To generate and output files, create them in the local execution storage, then upload them to YepCode Storage using the \`yepcode.storage\` helpers. Once uploaded, you can download them using the download storage MCP tool.
272
+
273
+
Tip: First try to find a tool that matches your task, but if not available, try generating the code and running it here.`,
274
+
inputSchema: zodToJsonSchema(
275
+
buildRunCodeSchema(
276
+
envVars.map((envVar)=>envVar.key),
277
+
codingRules
278
+
)
279
+
),
280
+
});
281
+
}
282
+
241
283
letpage=0;
242
284
letlimit=100;
243
285
while(true){
@@ -262,6 +304,7 @@ Tip: First try to find a tool that matches your task, but if not available, try
0 commit comments