Skip to main content
Glama

execute_code_with_variables

Execute JavaScript or Python code with dynamic input variables that can be defined and passed as key-value pairs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCode to execute
inputNoAdditional input data for the program (stdin)
timeoutNoExecution timeout in milliseconds (max 60000)
languageYesProgramming language to execute
variablesNoDynamic input variables as key-value pairs. Can be a JSON object or a JSON string (e.g., {"name": "John", "age": 25, "items": [1,2,3]} or "{\"name\": \"John\", \"age\": 25}")
memoryLimitNoMemory limit in MB (max 512)
enableNetworkingNoEnable network access for this execution

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must carry the burden of behavioral disclosure. It only explains the variable-passing mechanism but fails to disclose execution environment details, return format, error behavior, side effects, or security implications of running arbitrary code. This is a significant gap for a code execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded with the verb and resource, immediately conveying the core purpose and differentiator. Every word earns its place; there is no fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite covering main parameters in the schema, the description leaves critical questions unanswered for a code execution tool: How are variables exposed to the code? What is the return format? How are errors reported? Are there sandboxing or security concerns? No output schema exists, so the description should compensate but does not.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all 7 parameters. The description adds minimal extra meaning by conceptualizing 'variables' as key-value pairs, but it does not elaborate on input, timeout, memoryLimit, enableNetworking, or their defaults. The baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Execute', the resource ('JavaScript or Python code'), and the key differentiator 'dynamic input variables' that can be passed as key-value pairs. This distinguishes it from siblings like execute_code and python_execute by focusing on variable support.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when dynamic variables are needed, but it does not explicitly mention alternatives or exclusion scenarios. There is no guidance such as 'for simple execution without variables, use execute_code' or 'when you need networking, enable enableNetworking'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

C2.4/5.0
Disambiguation2/5

Several tools have overlapping or ambiguous purposes that could confuse an agent. For example, analyze_code, analyze_patterns, and analyze_design_patterns all involve code analysis with unclear boundaries, while check_deceptive_patterns and check_placeholders seem like subsets of analyze_code. The NPM tools form a coherent group but are distinct from the rest, creating a fragmented toolset.

Naming Consistency2/5

Naming conventions are highly inconsistent across the toolset. Some tools use snake_case (e.g., analyze_code, execute_code), others use camelCase (e.g., npmAlternatives, npmChangelogAnalysis), and there are mixed styles like query-docs with hyphens. The NPM tools follow a consistent npmPrefix pattern internally, but this is not applied to other tools, leading to overall chaos.

Tool Count2/5

With 39 tools, this server is overloaded for a 'DevTools Collection' scope. The count feels excessive, as many tools could be consolidated (e.g., multiple analysis tools) or logically grouped. While the NPM tools are numerous but focused, the overall set lacks cohesion, making it cumbersome for an agent to navigate and select appropriate tools efficiently.

Completeness3/5

The toolset covers a broad range of development tasks, including code analysis, execution, documentation, and package management, but there are notable gaps. For example, there is no tool for code generation or refactoring, and the Microsoft and NPM tools are well-covered but isolated from other functionalities. The surface is extensive but not fully integrated, with some dead ends in workflow transitions.

Resources