Skip to main content
Glama

tv_ui_state

Check the current TradingView UI state to detect open panels, dialogs, active tabs, and enabled controls before interacting with elements like Pine Editor or Strategy Tester.

Instructions

Get real-time UI state of TradingView window: detects open/closed bottom panels, visible dialogs, active tabs, and enabled control buttons. WHEN TO USE: Call before interacting with UI panels (Pine Editor, Strategy Tester) to ensure target DOM elements are present. SIDE EFFECTS: None (Read-only). LIMITATIONS: Assumes standard desktop window hierarchy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the safety profile ('SIDE EFFECTS: None (Read-only)') and a real limitation ('Assumes standard desktop window hierarchy'), which is meaningful. However, with no output schema it never describes the shape of the returned state, nor failure behavior when the window hierarchy is non-standard, leaving the behavioral picture partial.

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?

Front-loaded with the core action, then clearly labeled WHEN TO USE / SIDE EFFECTS / LIMITATIONS blocks. Every clause carries information and there is no filler or repetition.

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?

Given a 0-param tool with no annotations and no output schema, the description covers purpose, invocation timing, safety, and a caveat, which is close to complete. The remaining gap is the return structure — what keys/state fields the agent can expect — which the missing output schema leaves to the description to supply.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a 0-param tool applies. No parameter-level confusion is possible.

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 ('Get') and resource ('real-time UI state of TradingView window') and enumerates exactly what it detects: bottom panels, dialogs, tabs, and control buttons. It doesn't explicitly differentiate itself from related siblings like tab_list, pane_list, or ui_find_element, which also expose UI/panel state, so an 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 Guidelines4/5

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

The 'WHEN TO USE' clause gives clear context: call before interacting with UI panels (Pine Editor, Strategy Tester) to confirm target DOM elements exist. It lacks any explicit when-not condition or named alternative (e.g., ui_find_element for a specific element), so the routing guidance is helpful but incomplete.

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