Skip to main content
Glama

close_window

Closes a target top-level 1C TestClient window via captured navigation replay, verifying the window is gone and the window behind becomes active.

Instructions

Close a top-level window natively. close (and activate) are window-level commands: …SecondaryFrame[<window>] 88 82 81 — the SAME family as the dialog close in answer_dialog, applied to any top-level window. This faithfully replays the genuine navigation from capture (open form -> open the catalog list -> drill a row -> the record card opens in a new window) then the window-level close on the active card; GUID rebinder rebinds the list/card window GUIDs as they appear (first-appearance, same machinery as open_card / answer_dialog), and the replay is truncated just before any subsequent close so ONLY the target window (window_ref, default the card's record data ref) is closed. Confirmed by the closed window's (live, rebound) SecondaryFrame being reported by the client BEFORE the close but gone AFTER it (closed), and the window behind it becoming active (active_window_after). Returns {window_ref, window_sf, live_window_sf, accepted, closed, active_window_after}. NOTE: replays the captured open-card->close flow, so it closes that card window; to close a different window, capture that flow (the window-level close mechanism is identical).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNo127.0.0.1
portNo
captureNogenuine-card96-windows3-20260618/traffic
window_refNoe1cib/data/Справочник.Контрагенты

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely does: it discloses the replay mechanism, GUID rebinding, truncation just before subsequent closes so only the target window is closed, and verification via the live SecondaryFrame being reported before but gone after, plus the window behind becoming active. This is unusually rich behavioral disclosure. Auth/permission requirements and failure modes are not addressed, keeping 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.

Conciseness2/5

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

The first sentence is well front-loaded, but the remainder is a sprawling run-on dense with internal jargon (SecondaryFrame, GUID rebinder, capture replay, truncated replay) that obscures rather than clarifies. Much of the mechanism detail is not needed to select or invoke the tool.

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 the inline return-shape listing is redundant but harmless. For a 4-parameter tool with no annotations, the description thoroughly covers behavior but leaves host/port semantics undocumented, so an agent still lacks full parameter context despite the verbose prose.

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

Parameters2/5

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

Schema description coverage is 0% across 4 parameters, so the description must compensate but only partially does. It clarifies window_ref (defaults to the card's record data ref) and gives context for capture (the captured open-card flow), but host and port receive no explanation and their defaults are buried in the schema. The heavy coverage gap is only partly closed.

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?

Opens with a clear verb+resource: 'Close a top-level window natively.' It also distinguishes its scope from siblings by contrasting the window-level close against the dialog-level close in answer_dialog, so an agent can separate it from dialog handling. The clarity is undercut by heavy internal jargon, but the core action is identifiable.

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?

The NOTE provides real guidance: it explains that the tool replays the captured open-card->close flow and therefore closes that specific card window, and tells the user to capture that flow to close a different window. However, no explicit alternatives or when-not-to-use conditions are named beyond this constraint, leaving the agent to infer the rest.

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