Skip to main content
Glama

tc_form

Act on a managed form: navigate elements, read focused element, create/compare snapshots, execute choices. Verify effects by reading state.

Instructions

Actions on the managed form itself, including navigation between form elements and reading the focused element. Choose action. 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. ok=true means accepted; verify effects by reading state. target_check: present, unknown (uncheckable), off (disabled); present does not prove an effect. target_hidden=true means the target exists but is invisible; it describes the element, not its ancestors. Its absence says nothing; hidden targets may still act (e.g. activate). Invalid addresses are rejected only where the address can be checked; an unverified empty read may mean a missing target. failure_context describes state/editor/choices; its complete=false means incomplete diagnostics. Actions:

  • compare_snapshot(snapshot_id*, ref=null) Compare the original form instance with its baseline; optional ref must identify the same instance. Returns changes/added/removed; observed means previously unread properties, not changes. complete/baseline_complete/errors mark read gaps. Uses baseline table settings; table_changes matches 1-based row positions and column titles, *_present distinguishes missing/empty cells. Tables are prepared before reading and stay selected; truncated tables are not compared. Added flags: '-' unread, 'unknown' failed. Stores no new snapshot; closed/reconnected forms need a new baseline. (1C 8.3.3+)

  • create_snapshot(ref=null, include_tables=False, max_rows=500) Save ManagedForm state (default active) for later compare_snapshot; returns snapshot_id/summary. Reads visibility/availability/read-only and ordinary values; hidden branches skip further reads, disabled elements skip read-only. include_tables adds display-ordered rows up to max_rows each without expanding trees; requires active form/finished input (8.3.6+). Tables requiring sequential navigation report table_requires_sequential_read and complete=false; use read_rows separately. Rows stay selected; 8.3 may activate/establish current rows. Preparation precedes final reading. Excludes document contents; sequential, not atomic; may take seconds. (1C 8.3.3+)

  • current_modified(ref*) Whether a form has been modified. (1C 8.3.3+)

  • delete_snapshot(snapshot_id*) Delete a saved snapshot belonging to this connection.

  • execute_choice_from_list(ref*, index*) Pick an item from a modal choice list by 0-based index or display text. Not a field's drop-down (use tc_field(action="choose_from_drop_list")). ref: the form (ManagedForm), not a field. (1C 8.3.8+)

  • execute_choice_from_menu(ref*, index*) Choose an item from an open menu by 0-based index or display text. For a submenu, call again to choose its item. Address the form or the spreadsheet field that opened the menu. A spreadsheet field requires platform 8.3.25 or newer. (1C 8.3.8+)

  • find_default_button(ref*) Find the form's default button. ref is the form's ref. (1C 8.3.3+)

  • get_context(ref=null, save_as_snapshot=False, include_tables=False, max_rows=500, root_ref=null, visible_only=False, include_commands=True, result_mode='changes') Inspect ManagedForm elements (including hidden), state, values and input context; includes discovery, so no separate search is needed. Use tc_find(action="find_objects") alone for element lookup. May take seconds. result_mode=changes returns a full first read, then only new/changed elements and removed objects since the previous complete read of this form; changed=false means no changes. Other interaction fields describe the current state. full returns everything. result_mode and full_reason identify the actual response; context_id/compared_to identify automatic baselines. Filter changes or lost baselines return full. Incomplete reads return full and keep the prior baseline. save_as_snapshot creates a separate fixed snapshot for compare_snapshot without another read. include_tables adds up to max_rows per table without expanding trees; rows stay selected, 8.3 may activate rows. Excludes document contents. Flags: '-' unread, 'unknown' failed, null unavailable (not empty). form_details reports optional hints/type restrictions/choices availability. root_ref limits output to a subtree; include_commands=false omits buttons/command groups; visible_only excludes known hidden/inactive pages, retains unknown visibility. Output filters do not narrow reading or fixed snapshot scope. complete/errors mark read gaps; snapshot_error marks failed saving. Sequential reads. (1C 8.3.3+)

  • get_current_element(ref*) Get the managed form's focused element as item: [{ref}]. ref: the form (ManagedForm). The platform can return no current element after navigating out of its fields.

  • goto_next_element(ref*) Move focus to the next element in the managed form's tab order. ref: the form (ManagedForm). This can finish the current field's pending input; read the field's data presentation to verify acceptance. Reference fields may still require choosing a value.

  • goto_previous_element(ref*) Move focus to the previous element in the managed form's tab order. ref: the form (ManagedForm). This can finish the current field's pending input; read the field's data presentation to verify acceptance.

  • list_snapshots(ref=null) List saved snapshots for this connection, optionally restricted to one ManagedForm ref. Returns IDs, form titles, timestamps, element counts, sizes and global storage limits. Listing does not refresh last_used_at or verify forms are still open; a supplied ref is validated.

  • wait_for_closing(window_title=null, timeout=60) Wait until a window closes, up to timeout seconds. Without window_title, watch the window active AT THE MOMENT OF THE CALL. After a close, pass window_title to check the closed window. Switching windows or opening a preview does not count as closing. If the target cannot be identified or its absence confirmed, return ok=False. (1C 8.3.3+) ref/root_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/root_ref; re-find expired elements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
indexNo
actionYes
timeoutNo
max_rowsNo
root_refNo
result_modeNo
snapshot_idNo
visible_onlyNo
window_titleNo
connection_idNo
include_tablesNo
include_commandsNo
save_as_snapshotNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.8.0
    • addedInput schema / properties / include_commands
      Added value: +{
      +  "default": null,
      +  "title": "Include Commands",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / result_mode
      Added value: +{
      +  "default": null,
      +  "enum": [
      +    "changes",
      +    "full"
      +  ],
      +  "title": "Result Mode",
      +  "type": "string"
      +}
    • addedInput schema / properties / root_ref
      Added value: +{
      +  "default": null,
      +  "title": "Root Ref",
      +  "type": "string"
      +}
    • addedInput schema / properties / visible_only
      Added value: +{
      +  "default": null,
      +  "title": "Visible Only",
      +  "type": "boolean"
      +}
  2. Changed5 schema fields changedv1.4.0
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "current_modified",
      -  "execute_choice_from_list",
      -  "execute_choice_from_menu",
      -  "find_default_button",
      -  "get_current_element",
      -  "goto_next_element",
      -  "goto_previous_element",
      -  "wait_for_closing"
      -]New value: +[
      +  "compare_snapshot",
      +  "create_snapshot",
      +  "current_modified",
      +  "delete_snapshot",
      +  "execute_choice_from_list",
      +  "execute_choice_from_menu",
      +  "find_default_button",
      +  "get_context",
      +  "get_current_element",
      +  "goto_next_element",
      +  "goto_previous_element",
      +  "list_snapshots",
      +  "wait_for_closing"
      +]
    • addedInput schema / properties / include_tables
      Added value: +{
      +  "default": null,
      +  "title": "Include Tables",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / max_rows
      Added value: +{
      +  "default": null,
      +  "title": "Max Rows",
      +  "type": "integer"
      +}
    • addedInput schema / properties / save_as_snapshot
      Added value: +{
      +  "default": null,
      +  "title": "Save As Snapshot",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / snapshot_id
      Added value: +{
      +  "default": null,
      +  "title": "Snapshot Id",
      +  "type": "string"
      +}
  3. First observedv1.0.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so extensively: it explains ok=true semantics and the need to verify effects, target_check states (present/unknown/off), target_hidden meaning, failure_context and complete=false diagnostics, incomplete-read fallback to full with retained baselines, sequential/non-atomic snapshots that 'may take seconds', version gating (1C 8.3.3+/8.3.6+/8.3.25), and that snapshots store no new data on compare. This is unusually thorough disclosure of edge cases and side effects.

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?

The description is long but front-loads the purpose and organizes per-action detail into scannable bullets, with a shared caveat block before the action list. Some table-reading and snapshot caveats are restated across actions, and the density is high, so it is efficient but not maximally tight.

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?

There is no output schema and no annotations, so the description must cover inputs and returns, and it describes return shapes for most actions (changes/added/removed, snapshot_id/summary, item:[{ref}], ID/title/timestamp listings). Given 14 parameters and 13 actions it is close to complete, with only a few actions (delete_snapshot, current_modified) lightly specified.

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

Parameters4/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 compensate, and it largely does: it defines ref/root_ref ('ref: the form (ManagedForm), not a field'), result_mode=changes vs full and the meaning of changed=false, include_tables/max_rows row semantics, save_as_snapshot, visible_only, include_commands, index (0-based), window_title, timeout, and connection_id. Only minor gaps remain (e.g., default resolution for ref when null).

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 line states a clear verb+resource ('Actions on the managed form itself, including navigation... and reading the focused element') and the per-action bullets make each sub-operation unambiguous. It also names siblings it is not (tc_field for drop-downs, tc_find for element lookup), aiding discrimination. It stops short of a 5 only because the top-level scope is a broad action bundle rather than a single crisp purpose.

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?

Routing guidance is present and specific in several places: 'Not a field's drop-down (use tc_field(action="choose_from_drop_list"))', 'Use tc_find(action="find_objects") alone for element lookup', and the 'Also available' list. However there is no overall statement of when tc_form is the right entry point versus the other sibling families, so it falls short of explicit when/when-not coverage.

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