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

mcp-1c-local-bridge

by ntappw

eval

Execute 1C expressions and return typed values, references, object fields, and table rows; writes roll back unless explicitly allowed, with server or client execution.

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. Changed1 schema field changedv1.6.0
    • changedInput schema / properties / side / description
      Previous value: -"server - на сервере 1С; client - в модуле формы обработки на клиенте (нужно разрешение «Код на клиенте» на форме, транзакции и отката нет)."New value: +"server - на сервере 1С; client - на клиенте, в служебной форме обработки (нужно разрешение «Код на клиенте» на форме, транзакции и отката нет; при выдаче с подтверждением не выполняется)."
  2. 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"
      +}
  3. First observedv1.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full load and does real work: it states that server-side evaluation runs inside a transaction that is rolled back unless allow_write, and that tables/samples are capped at 1000 rows. Gaps remain around error behavior, the timeout-to-result handoff, and permission requirements, which keep it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core action, then output shape, then transaction semantics. Dense but every sentence carries information; only the clause enumerating result shapes is slightly over-packed for a single sentence.

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?

An output schema exists, so return values need not be spelled out, and the description still sketches them helpfully. But for a 7-parameter, annotation-free tool with server/client modes, sessions, and a timeout/result workflow, it omits the client-side caveats and the interaction with the result tool, leaving meaningful gaps.

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 coverage is 100%, so every parameter is already documented in the input schema and the baseline is 3. The description adds a little meaning by explaining what references and objects look like in the returned value (type, UUID, presentation; attributes and tabular sections), but it does not explain format, side, session, or timeout beyond what the schema says.

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 opening sentence gives a specific verb and resource: evaluates a 1C expression via Вычислить() and returns the value. It is far more precise than a tautology, but it never distinguishes itself from plausible siblings such as execute or query, so the agent must infer the boundary.

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?

There is no explicit when-to-use / when-not-to-use guidance and no named alternative for the case where the agent wants to run code rather than evaluate an expression. The transaction/rollback remark is behavioral context, not routing guidance, so the agent gets no help choosing between eval and its siblings.

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