Skip to main content
Glama

Execute TypeScript

execute_typescript
Destructive

Run a TypeScript program in a sandbox that can call the external_ functions declared by search_tools. Use this to orchestrate multiple tool calls (looping, branching, combining results) in one round trip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesA TypeScript program body. Call `external_<toolName>(args)` (from search_tools) to reach a tool; the value you `return` becomes the result.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
logsNo
errorNo
resultNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / code / description
      Previous value: -"A TypeScript program body. Call `external_<toolName>(args)` (from search_tools) to reach a tool; the value you `return`, or the last expression, becomes the result."New value: +"A TypeScript program body. Call `external_<toolName>(args)` (from search_tools) to reach a tool; the value you `return` becomes the result."
  2. 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 idempotentHint=false, so the agent knows this is an unsafe, non-repeatable, world-touching operation. The description adds the useful fact that code runs in a sandbox, but does not disclose that the external_ calls reach real systems with real side effects, nor any timeout, resource, or library constraints.

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, zero filler, front-loaded with what the tool does and followed immediately by the reason to choose it over making calls individually.

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?

Covers purpose, execution model, and the calling convention for external tools; an output schema exists so return values need not be described. It could say more about sandbox limits (available libraries, timeouts, whether side effects persist), which matters for a destructive, open-world tool.

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

Parameters4/5

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

Only one parameter and schema description coverage is 100%, so the schema already defines the `code` body, the external_<toolName>(args) calling convention, and that the returned value becomes the result. The description reinforces the orchestration intent but adds no syntax or format detail beyond the schema.

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 (run/execute) and resource (a TypeScript program in a sandbox), plus the mechanism that makes it distinctive: calling external_<toolName> functions declared by search_tools. An agent can distinguish this from its only sibling, search_tools, without opening the schema.

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 positive trigger ('orchestrate multiple tool calls ... looping, branching, combining results, in one round trip') and points to search_tools as the prerequisite for discovering the external_ functions. It stops short of an explicit exclusion, e.g. that a single simple call should be made directly rather than through code execution.

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