execute_read
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
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript async function body. Discover with catalog.search/describe, call insales methods, return JSON. |