Skip to main content
Glama
mcp-1c-local-bridge

mcp-1c-local-bridge

by ntappw

eval

Computes a 1C expression and returns its value with references, object fields, tables, or sample rows, using server or client execution and optional write rollback.

Instructions

Вычисляет выражение 1С (Вычислить) и возвращает значение. Ссылки приходят типом, UUID и представлением, объекты - реквизитами и табличными частями, таблицы и выборки - строками (не больше 1000). На сервере выражение вычисляется в транзакции, которая затем откатывается (если не allow_write).

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": {
      "expression": "<expression>"
    },
    "name": "eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideNoserver - на сервере 1С; client - в модуле формы обработки на клиенте (нужно разрешение «Код на клиенте» на форме, транзакции и отката нет).server
formatNotable - таблицы и сводки для чтения, ссылки показаны представлениями; json - ответ как есть, с типами и UUID ссылок.json
sessionNoСеанс моста: идентификатор из sessions или часть строки соединения, имени конфигурации, пользователя. Не указан - единственный открытый сеанс.
timeoutNoСколько секунд ждать ответ. Команда, которую обработка не начала за это время, снимается; начатая выполняется дальше, её результат забирается инструментом result.
expressionYesВыражение 1С для Вычислить().
allow_writeNotrue - сохранить изменения, если на форме включено разрешение «Запись в базу»: по умолчанию код идёт в транзакции, которая фиксируется, только если он отработал без ошибок (см. transaction). Пока разрешение выключено, код всё равно выполнится с откатом, в ответе будет предупреждение.
transactionNoТолько для записи (allow_write=true). true - в транзакции: при ошибке изменения откатываются целиком. false - без транзакции моста: что код успел записать до ошибки, остаётся. false нужен долгим операциям (транзакция держит блокировки всё время выполнения) и коду, который сам управляет транзакциями или ждёт фоновые задания.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.4.0
    • changedInput schema / properties / allow_write / description
      Previous value: -"true - выполнить без отката транзакции, изменения сохранятся, если на форме включено разрешение «Запись в базу». Пока оно выключено, код всё равно выполнится с откатом, в ответе будет предупреждение."New value: +"true - сохранить изменения, если на форме включено разрешение «Запись в базу»: по умолчанию код идёт в транзакции, которая фиксируется, только если он отработал без ошибок (см. transaction). Пока разрешение выключено, код всё равно выполнится с откатом, в ответе будет предупреждение."
    • addedInput schema / properties / transaction
      Added value: +{
      +  "default": true,
      +  "description": "Только для записи (allow_write=true). true - в транзакции: при ошибке изменения откатываются целиком. false - без транзакции моста: что код успел записать до ошибки, остаётся. false нужен долгим операциям (транзакция держит блокировки всё время выполнения) и коду, который сам управляет транзакциями или ждёт фоновые задания.",
      +  "title": "Transaction",
      +  "type": "boolean"
      +}
  2. First observedv1.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations supplied, the description meaningfully discloses behavior: server-side evaluation runs inside a transaction that is rolled back unless allow_write is set, and result sets are truncated at 1000 rows. Gaps remain around failure modes, what happens on a client-side call, and the fact that this is arbitrary code execution with real safety implications.

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 what the tool does, then return shape, then the transaction caveat. No filler, and the most surprising behavior (automatic rollback) is placed where it will be seen.

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?

For a 7-parameter arbitrary-evaluation tool with no annotations, the description covers the two things an agent most needs to know: what the return shape is and that writes are rolled back by default. An output schema exists, so return-value detail is not required, and the remaining client/transaction nuances are handled in the schema descriptions.

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

Parameters3/5

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

Schema description coverage is 100% and each parameter carries a rich enum or default description, so the schema already does the heavy lifting; the baseline is 3. The description only reinforces allow_write through the rollback sentence and adds no format/session/timeout semantics of its own.

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?

The description states a specific verb+resource ('Вычисляет выражение 1С (Вычислить)') and adds the return shape (links as type/UUID/presentation, tables as rows capped at 1000), which is more than a restatement of the name. It does not, however, distinguish itself from siblings such as execute, query, or result, so an agent must infer which of these eval actually is.

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

Usage Guidelines2/5

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

The description body contains no guidance about when to use eval rather than execute, query, or metadata; no alternatives are named and no preconditions are stated. Only the parameter descriptions incidentally reference sibling tools (result, sessions, transaction), which is not the same as routing guidance.

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