Skip to main content
Glama

Execute TypeScript

execute_typescript
Destructive

Execute a TypeScript program that orchestrates the available tools in a sandbox. Prefer this over calling tools one at a time when a task needs multiple tool calls, batching, aggregation, or arithmetic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesA TypeScript program that orchestrates the available external_* tools and returns a final value. Use Promise.all to batch calls; do arithmetic in JS. End with `return <value>`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
logsNo
errorNo
resultNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/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 agent knows this is an arbitrary code execution surface with side effects. The description adds the useful 'sandbox' qualifier, but never warns that the executed program can invoke any external tool including destructive ones, nor mentions timeouts or execution limits. Useful context, but thin for a destructive 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?

Two sentences, no filler, with the core capability stated first and the usage preference second. Every clause earns its place.

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?

An output schema exists so return values need no explanation, and the schema covers how to write the program. What remains unstated is the sandbox's operational envelope (available external_* APIs, limits, side-effect risk), which is a modest gap rather than a blocking one given the annotation coverage.

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 description coverage is 100% and the single 'code' parameter is well documented in the schema (Promise.all batching, JS arithmetic, `return <value>`). The description adds no syntax, format, or constraint detail beyond that, so baseline 3 applies.

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 and resource: 'Execute a TypeScript program that orchestrates the available tools in a sandbox.' An agent immediately knows this runs code rather than calling a tool, which cleanly separates it from search_tools and from ordinary tool invocation.

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

Usage Guidelines5/5

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

Gives an explicit selection rule: 'Prefer this over calling tools one at a time when a task needs multiple tool calls, batching, aggregation, or arithmetic.' It names both the alternative behavior and the conditions that favor this tool, leaving nothing to inference.

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