Skip to main content
Glama

Execute TypeScript

execute_typescript
Destructive

Run a single TypeScript program in a sandboxed interpreter. The program may call any external_ function declared by search_tools, batching multiple tool calls into one program instead of one MCP round trip per call. Call search_tools first to see what is declared.

Input Schema

NameRequiredDescriptionDefault
codeYesTypeScript source. May call external_<name>(...) functions declared by search_tools.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, and readOnlyHint=false, so the safety profile is covered structurally. The description adds useful context by calling out the 'sandboxed interpreter' and that the program can invoke external declared functions, but it omits error behavior, execution limits, and what happens to side effects the called tools produce.

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?

Three short sentences, front-loaded with the core action, followed by the batching benefit and the prerequisite. No filler sentences.

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

Completeness4/5

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

With no output schema and a single required parameter, the description covers what the tool does, why to use it, and how to prepare (search_tools). It would be more complete with a note on how results/errors surface, but the essentials for a correct call are present.

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?

Only one parameter at 100% schema coverage, so the schema already documents `code`. The description reinforces that the source may call external_<name>(...) functions, which matches the schema text, adding no real syntax or format detail beyond it. Baseline 3 is appropriate for full coverage.

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?

States a specific verb+resource (run a TypeScript program) plus scope (sandboxed interpreter) and the key differentiating capability: calling external_<name> functions to batch tool calls. An agent can distinguish this from the sibling search_tools immediately.

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

Usage Guidelines4/5

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

Gives a clear when-to-use rationale (batching multiple tool calls into one program instead of one round trip per call) and an explicit prerequisite (call search_tools first). No when-not or exclusion guidance, but the context is unambiguous.

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.

Resources