Skip to main content
Glama

execute_js

Execute JavaScript code in any Tabby terminal tab and return the result. Code runs with fresh scope and async support.

Instructions

Execute JavaScript code in Tabby terminal context and return the result. Code is wrapped in async IIFE by default for fresh scope and await support.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesTarget tab: index (0=first, -1=last) or WebSocket URL from list_targets
codeYesJavaScript code to execute. Use 'return' to return values.
wrapNoWrap code in async IIFE for fresh scope + await support. Set to false for raw execution (e.g., defining globals).
Behavior4/5

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

Without annotations, the description must carry behavioral disclosure. It correctly reveals default async IIFE wrapping and await support. However, it omits details on error handling, side effects, or security implications, which are relevant for a code 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 efficient sentences: the first front-loads the primary purpose, the second adds critical behavioral detail. No filler, every word contributes.

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 3-parameter tool with no output schema or annotations, the description is moderately complete. It covers the main action and the wrap behavior, but lacks information on error handling, return format details, and potential side effects, which are needed given the tool's power.

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 context by explaining the wrap parameter's purpose (async IIFE for fresh scope and await support), going beyond the schema. However, it does not add meaning to target or code beyond what the schema provides.

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 that the tool executes JavaScript code in the Tabby terminal context and returns results, distinguishing it from siblings like list_targets (listing) and screenshot (capturing). The mention of async IIFE adds specificity.

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 implies when to use this tool (for executing JS code) versus siblings, but lacks explicit when-not or alternative guidance. The context from sibling names helps, but the description itself doesn't provide exclusion criteria.

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/halilc4/tabby-mcp'

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