Skip to main content
Glama

execute_script

Run Starlark scripts with all tools as built-in functions. Execute code once in a sandbox and return only the 'result' variable, reducing cost compared to sequential tool calls.

Instructions

Run a Starlark (Python-subset) script with all tools as built-in functions. Intermediate results stay in the sandbox; only result variable is returned. Much cheaper than sequential tool calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesStarlark source. Set `result` variable for output.
timeoutNoMax seconds (default: 60)
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It discloses sandbox behavior and cost efficiency, but omits important traits like potential security risks, error handling, or permissions needed for executing arbitrary scripts.

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 two sentences with no wasted words. It front-loads the core action and immediately provides critical behavioral context, making it highly efficient for an AI agent.

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?

Despite no output schema, the description explains the return behavior (only result variable). It mentions sandbox and cost efficiency. However, it could be improved by noting error behavior or limitations, but it's generally complete for an agent.

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?

Schema coverage is 100%, so baseline is 3. The description adds value by specifying that the result variable must be set in the code, which is a key semantic nuance beyond the schema's basic description.

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 it runs a Starlark script with all tools as built-in functions, and distinguishes from sequential calls. It specifies the language, sandbox behavior, and return value, making the purpose unambiguous.

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?

The description mentions it's 'much cheaper than sequential tool calls,' which provides a clear use case. However, it does not explicitly state when not to use it or compare to other siblings like batch, leaving some guidance gaps.

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/beardfaceguy/daimonos'

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