Skip to main content
Glama

execute_read

Read-onlyIdempotent

Executes read-only JavaScript against InSales APIs to discover operations, inspect schemas, and retrieve catalog, product, page, theme, or widget data without writes or drafts.

Instructions

Discover operations and execute read-only JavaScript. Example: return await catalog.search({query:"виджет настройки"}); No drafts or writes. Code is an async function body: await calls and return JSON. First return await insales.list_stores({}) to obtain store_id. Discover with catalog.search({query?:string,domain?:string,limit?:number}); inspect arguments with catalog.describe({names:string[]}), e.g. return await catalog.describe({names:["get_widget","update_widget"]}); then call insales.(args). Search without query lists domains. Batch related descriptions and compose known calls in one script; return focused data. Do not guess arguments: use inputSchema or the schema returned by validation errors. Results contain status, result/error, steps and execution_id. Large results/errors have result_ref/error_ref: read runtime.get_result(ref,{offset,limit}); inspect writes using runtime.get_execution(id). No imports, process, filesystem, crypto, timers or arbitrary network.

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_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript async function body. Discover with catalog.search/describe, call insales methods, return JSON.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare read-only, open-world, idempotent, and non-destructive behavior, but the description adds substantial runtime context: code is an async function body, results include status/result/error/steps/execution_id, large outputs use result_ref/error_ref, and imports/process/filesystem/crypto/timers/arbitrary network are prohibited.

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 dense but front-loaded and every sentence carries operational value: purpose, example, constraints, discovery workflow, result handling, and security restrictions. It contains no filler.

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

Completeness5/5

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

For a complex read-only code execution tool with no output schema, the description covers execution semantics, discovery, argument validation, result refs, execution inspection, and sandbox restrictions. An agent has enough information to invoke it correctly.

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

Parameters5/5

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

Although the schema fully documents the single code parameter, the description meaningfully expands on it by explaining the expected async function body shape, await/return patterns, discovery helpers, and an example call.

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 first sentence states the specific action and scope: discover operations and execute read-only JavaScript. It also explicitly excludes drafts and writes, which distinguishes it from the sibling write tool.

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

Usage Guidelines5/5

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

The description provides a concrete workflow: use catalog.search/describe for discovery, call insales.list_stores first to obtain store_id, then call insales.<method>. It also states the when-not condition ('No drafts or writes') and warns against guessing arguments.

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

Deploy Server

Other Tools