Skip to main content
Glama
mitsuhiko
by mitsuhiko

Execute JavaScript/TypeScript

execute

Run JavaScript/TypeScript scripts with authenticated access to Google Workspace APIs like Calendar and Drive for custom automation and data operations.

Instructions

Execute JavaScript/TypeScript inside a Node vm context with authenticated Google Workspace access. TypeScript type syntax is stripped before execution. The script runs inside an async function body and can use: auth, google, workspace, state. Return values with return ....

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript/TypeScript async function body. Type syntax is stripped before execution. Available variables: auth, google, workspace, state.
timeoutMsNoExecution timeout in milliseconds (default: 30000).
scopesNoOptional OAuth scopes override. Defaults to broad Google Workspace scopes.
resetStateNoReset persistent `state` object before execution.
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the execution environment (Node vm), authentication context, TypeScript handling, and available variables, which is valuable. However, it lacks critical behavioral details like security implications, error handling, resource limits, or what happens with the 'state' object persistence.

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

Conciseness4/5

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

The description is efficiently structured in two sentences that each add value: the first establishes the execution context and capabilities, the second explains return value mechanics. There's minimal redundancy, though it could be slightly more front-loaded about the core purpose.

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

Completeness3/5

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

For a complex tool that executes arbitrary code with authentication and state management, the description provides adequate technical context about the execution environment but lacks important completeness elements. With no output schema and no annotations, it should explain more about return values, error conditions, security boundaries, and the persistence model for the 'state' object.

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%, so the schema already documents all parameters thoroughly. The description adds minimal parameter semantics beyond the schema - it mentions 'auth, google, workspace, state' for the script parameter, which slightly reinforces the schema. This meets the baseline expectation when schema coverage is complete.

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 specific action ('Execute JavaScript/TypeScript'), the environment ('inside a Node vm context with authenticated Google Workspace access'), and the available resources ('auth, google, workspace, state'). It distinguishes this as a code execution tool with specific runtime characteristics, which is unambiguous even without sibling tools.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives or what scenarios it's designed for. It explains technical capabilities but offers no context about appropriate use cases, prerequisites, or limitations beyond the execution mechanics.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mitsuhiko/google-workspace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server