Skip to main content
Glama

tc_window

Manage 1C client windows: activate or close them, navigate between open windows, execute navigation commands, inspect the command interface, and read or answer user messages and dialogs.

Instructions

Actions on the client application window. Also available: tc_field(action="is_visible"), tc_field(action="is_enabled"), tc_field(action="get_context_menu"), tc_app(action="get_parent").

  • marks a required action parameter; the group schema treats action parameters as optional. Pass action="name" and only that action's parameters. Actions:

  • activate_window() Activate the current active window. (1C 8.3.3+)

  • answer_dialog(confirm=True, timeout=5) Wait up to timeout seconds and answer a modal question: confirm=true presses Button0, false Button1. Never presses Button2; inspect the question/window for other choices. Returns answered='Да'/'Нет' and question; both null means no dialog, question alone null means unreadable text. (1C 8.3.3+)

  • choose_user_message(text*, ref=null) Click the first user message matching text in the addressed window (active if omitted); * and ? are wildcards. Use get_user_message_texts to read the available messages first. (1C 8.3.3+)

  • close_user_messages_panel(ref=null) Close the addressed window's user-messages panel (active if omitted). This hides the panel; previous messages can reappear when it is reopened. It does not clear message history. (1C 8.3.6+)

  • close_window(ref=null) Close the window at ref, or the active window if omitted. Returns closed only after verifying that the window disappeared. If it remains open, returns window_not_closed and target; inspect the form or answer its dialog before retrying. Also closes an active local print preview when ref is omitted. (1C 8.3.3+)

  • execute_command(command*) Open a navigation link, e.g. 'e1cib/list/Справочник.Контрагенты', 'e1cib/app/Обработка.Имя' or a URL returned by the command interface. For a button name or title, find it and use click. Returns the resulting window; window_changed=false reuses the previous window description. An opened error window is a failure. (1C 8.3.3+)

  • get_command_interface(ref=null, all_sections=False, section=null, search=null, limit=50, offset=0, refresh=False, timeout=120) Read the current command tree of ref (default: main application window), without clicking. all_sections=true waits for stable windows/menu, then scans sections and returns command counts; it changes menus, then attempts to restore them. Stops on window changes; check complete/restored and window_changes inside scan_error/restoration_error. Incomplete results stay cached; inspect the window state before refresh=true. No section read means ok=false. With all_sections=true, section (returned identifier or exact title) or search (path substring) returns cached commands, paged by limit=1..200 and offset; continue with next_offset. Commands contain title, path and url: pass url to execute_command. refresh=true repeats the scan; catalogues are kept until disconnect (up to 20 windows). timeout limits a scan in seconds (0 < timeout <= 3600). (1C 8.3.3+)

  • get_user_message_texts(ref=null, open_if_closed=True) Read messages from ref (active window if omitted). A closed panel is temporarily opened with Ctrl+Shift+Z and closed again; this requires local desktop access and the addressed window to be active (foreground on a shared desktop). Remote clients require an open panel. open_if_closed=false reads without opening; a closed panel returns user_messages_unavailable. Messages can belong to earlier actions or appear late; closing the panel does not erase them. A restore failure returns the messages with ok=false and panel_restored=false. (1C 8.3.3+)

  • goto_next_window(ref=null) Go to the next open window from the addressed main window (active if omitted). The client returns an error if navigation is unavailable. (1C 8.3.6+)

  • goto_previous_window(ref=null) Go to the previous open window from the addressed main window (active if omitted). The client returns an error if navigation is unavailable. (1C 8.3.6+)

  • goto_start_page(ref=null) Go to the start page from the addressed main window (active if omitted). The client returns an error if navigation is unavailable. (1C 8.3.6+)

  • open_user_messages_panel(ref=null) Open ref's user-message panel (active window if omitted); an open panel is left open. Uses Ctrl+Shift+Z: requires a local client and the addressed window active, foreground on a shared Windows/Linux desktop. macOS needs Accessibility permission. Remote/inaccessible clients return a refusal. Returns opened and panel_open. (1C 8.3.6+) ref selects the client; otherwise set connection_id when several clients are connected. Use tc_session(action="list_connections"). Success may omit target/connection echoes and shorten window details. Use returned references unchanged in ref; re-find expired elements.

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": {
      "action": "<action>"
    },
    "name": "tc_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
textNo
limitNo
actionYes
offsetNo
searchNo
commandNo
confirmNo
refreshNo
sectionNo
timeoutNo
all_sectionsNo
connection_idNo
open_if_closedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv1.9.0
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "activate_window",
      -  "answer_dialog",
      -  "choose_user_message",
      -  "close_user_messages_panel",
      -  "close_window",
      -  "execute_command",
      -  "get_command_interface",
      -  "get_user_message_texts",
      -  "goto_next_window",
      -  "goto_previous_window",
      -  "goto_start_page"
      -]New value: +[
      +  "activate_window",
      +  "answer_dialog",
      +  "choose_user_message",
      +  "close_user_messages_panel",
      +  "close_window",
      +  "execute_command",
      +  "get_command_interface",
      +  "get_user_message_texts",
      +  "goto_next_window",
      +  "goto_previous_window",
      +  "goto_start_page",
      +  "open_user_messages_panel"
      +]
    • addedInput schema / properties / all_sections
      Added value: +{
      +  "default": null,
      +  "title": "All Sections",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": null,
      +  "title": "Limit",
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": null,
      +  "title": "Offset",
      +  "type": "integer"
      +}
    • addedInput schema / properties / open_if_closed
      Added value: +{
      +  "default": null,
      +  "title": "Open If Closed",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / refresh
      Added value: +{
      +  "default": null,
      +  "title": "Refresh",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / search
      Added value: +{
      +  "default": null,
      +  "title": "Search",
      +  "type": "string"
      +}
    • addedInput schema / properties / section
      Added value: +{
      +  "default": null,
      +  "title": "Section",
      +  "type": "string"
      +}
    • addedInput schema / properties / timeout / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
    • removedInput schema / properties / timeout / type
      Removed value: -"integer"
  2. Changed1 schema field changedv1.7.1
    • addedInput schema / properties / ref
      Added value: +{
      +  "default": null,
      +  "title": "Ref",
      +  "type": "string"
      +}
  3. Changed2 schema fields changedv1.5.0
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "activate_window",
      -  "answer_dialog",
      -  "close_user_messages_panel",
      -  "close_window",
      -  "execute_command",
      -  "get_command_interface",
      -  "get_user_message_texts",
      -  "goto_next_window",
      -  "goto_previous_window",
      -  "goto_start_page"
      -]New value: +[
      +  "activate_window",
      +  "answer_dialog",
      +  "choose_user_message",
      +  "close_user_messages_panel",
      +  "close_window",
      +  "execute_command",
      +  "get_command_interface",
      +  "get_user_message_texts",
      +  "goto_next_window",
      +  "goto_previous_window",
      +  "goto_start_page"
      +]
    • addedInput schema / properties / text
      Added value: +{
      +  "default": null,
      +  "title": "Text",
      +  "type": "string"
      +}
  4. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden and does so well: it discloses side effects (menus changed then restored, panel temporarily opened via Ctrl+Shift+Z), permission requirements (local desktop access, foreground window, macOS Accessibility), failure returns (window_not_closed, user_messages_unavailable, ok=false, panel_restored=false), caching behavior (incomplete results stay cached, catalogues kept until disconnect up to 20 windows), and timeout bounds. Return shapes for several actions are also described.

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?

Despite its length, the description is front-loaded with the tool scope, the action-parameter convention, and cross-references before listing actions. Each action entry is dense but earns its place by covering both semantics and failure behavior for a 12-action group schema.

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, annotation-free, 14-parameter, multi-action tool with no output schema, the description supplies everything an agent needs: action enumeration, parameter meanings, side effects, permission constraints, caching rules, timeout limits, and return/failure signals. No significant contextual gap remains.

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?

Schema description coverage is 0%, so the description must explain the 14 parameters, and it does: action is marked required with the group-schema caveat, ref is defined as the client selector with connection_id as an alternative, text supports wildcards, limit/offset control paging for get_command_interface, timeout is bounded (0 < timeout <= 3600), and all_sections/refresh/section/search/open_if_closed are all given operational meaning.

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 opens with 'Actions on the client application window' and enumerates twelve specific action verbs (activate_window, close_window, execute_command, goto_next_window, etc.), so an agent can see the tool's scope. It cross-references tc_field and tc_app for adjacent window/field behavior, but it does not explicitly distinguish this tool from siblings like tc_form or tc_session at the top level.

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

Usage Guidelines4/5

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

Per-action guidance is strong: choose_user_message says to use get_user_message_texts first, execute_command says to find and click a button rather than passing a title, and get_command_interface warns to inspect window state before refresh=true. However, there is no global statement of when to use tc_window versus sibling tools such as tc_form or tc_app, so usage routing is only partially covered.

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