Skip to main content
Glama

execute

Run async JavaScript to chain tools across sources and return final values plus logs, enabling agents to combine shared account tools in one call.

Instructions

Run an async JavaScript snippet that chains tools across sources. Each tool is tools.<source>.<tool>(args) and resolves to { data, error }. return the final value; console.log output comes back in logs. Use search_tools first to learn the schemas.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses asynchrony, the tools.<source>.<tool>(args) call convention, the {data, error} resolution shape, how the return value is captured, and where console.log output goes. It omits execution limits (timeouts, sandbox constraints) and whether side-effecting calls are permitted.

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?

Three tight sentences, front-loaded with the action, then the calling convention, then the prerequisite. Every sentence conveys operative information with no filler.

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?

No output schema exists, and the description adequately explains how results and logs are returned. For a code-execution tool, the remaining gap is environmental constraints (timeouts, sandbox, side effects), which an agent would want before running arbitrary snippets.

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?

The single parameter has 0% schema coverage, but the description compensates by explaining what the code string should contain, the tool-call syntax available inside it, and the return convention. Only the string type itself is left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: run an async JavaScript snippet that chains tools across sources. This clearly separates it from a single-call sibling like call_tool, though it never names that sibling explicitly, so differentiation is implied rather than stated.

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 concrete prerequisite workflow ('Use search_tools first to learn the schemas') and implies the use case is chaining across sources. It stops short of saying when to prefer call_tool over a snippet, so exclusion guidance is incomplete.

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