Skip to main content
Glama

sign_document

Signs a received Diadoc document using a client-supplied base64 signature or a test signature in the sandbox, enabling document approval within the workflow.

Instructions

Подписать входящий документ. Нужна готовая подпись (base64) или sign_with_test_signature в песочнице. / Sign a received document with a client-supplied signature.

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": {
      "box_id": "<box_id>",
      "message_id": "<message_id>",
      "entity_id": "<entity_id>"
    },
    "name": "sign_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
box_idYesИдентификатор ящика (boxId)
entity_idYesИдентификатор подписываемой сущности (ParentEntityId)
message_idYesИдентификатор сообщения (messageId)
signature_base64NoПодпись документа (base64). Боевую подпись формирует клиент (КриптоПро/CAdES).
sign_with_test_signatureNoПодписать тестовой подписью Diadoc (только в песочнице)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses two important traits: the signature must be client-prepared (the server does not generate a production signature) and the test-signature path is sandbox-only. It omits permissions/auth requirements, whether signing is irreversible or idempotent, and what happens on failure, so meaningful gaps remain.

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?

Very short and front-loaded, with the action stated first and the signature requirement second. The only waste is the full Russian/English duplication, which doubles length without adding information for an English reader.

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?

For a 5-parameter mutation with no annotations and no output schema, the description covers the action and the signature inputs but not the outcome. An agent still cannot tell what signing returns, whether the message/box identifiers must reference an existing unsigned entity, or what error state to expect in a non-sandbox call without a real signature.

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 schema, including the base64/CAdES note and the sandbox-only note for sign_with_test_signature. The description restates rather than extends that meaning, giving no new detail on which of the 5 parameters is used in which mode. Baseline 3 applies.

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: 'Sign a received document with a client-supplied signature.' This clearly separates it from siblings like get_document, send_document and list_documents. It stops short of 5 because it does not explicitly name which sibling would be used instead if the document were being fetched or sent rather than signed.

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

Usage Guidelines3/5

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

Gives one concrete usage condition: a prepared base64 signature is needed, or sign_with_test_signature in the sandbox. That is implied routing rather than explicit when-to-use/when-not guidance. Nothing tells the agent what to do if no signature is available outside a sandbox, or how this differs from other write operations.

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