Skip to main content
Glama
FerroxLabs

TVControl

by FerroxLabs

tab_close

Close the active TradingView chart tab. Optionally verify the tab title first, and choose to discard unsaved layout changes if confirmation is needed.

Instructions

Close the currently active chart tab. Names the tab it is about to close and refuses when no tab is marked active. Closing a chart tab cannot be undone through this API, so pass expect_title when it matters which one goes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expect_titleNoThe active tab title must contain this, otherwise nothing is closed. Use tab_list first to see the titles.
discard_unsavedNoAnswer TradingView unsaved-layout-changes dialog with "Close without saving" and LOSE those changes. Without this the tab stays open and the dialog is dismissed. "Save and close" is never clicked for you.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.3
    • addedInput schema / properties / discard_unsaved
      Added value: +{
      +  "description": "Answer TradingView unsaved-layout-changes dialog with \"Close without saving\" and LOSE those changes. Without this the tab stays open and the dialog is dismissed. \"Save and close\" is never clicked for you.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv2.3.0
    • addedInput schema / properties / expect_title
      Added value: +{
      +  "description": "The active tab title must contain this, otherwise nothing is closed. Use tab_list first to see the titles.",
      +  "type": "string"
      +}
  3. First observedv2.2.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It explicitly states that closing cannot be undone, that the tool names the tab before closing, and that it refuses when no tab is marked active. This is exactly the safety-relevant behavior an agent needs for a destructive operation.

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?

Three tightly written sentences, all carrying useful information: scope, refusal behavior, and irreversibility guidance. No filler or redundancy.

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?

Together with the schema, the description covers scope, failure conditions, destructiveness, and unsaved-changes handling. The tool names the tab it is about to close, so the lack of an explicit output schema is not a meaningful gap.

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?

Both parameters are fully documented in the schema, so the baseline is 3. The description adds meaningful value by explaining when expect_title matters due to irreversibility, effectively tying that parameter to safe invocation. The discard_unsaved behavior is already thoroughly covered in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with an unambiguous verb and resource: "Close the currently active chart tab." It distinguishes the tool from sibling tab tools by making the close action and active-tab scope explicit, so an agent can select it without confusion.

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 description clearly states the tool operates only on the active tab and tells agents to pass expect_title when closing the right tab matters. It doesn't explicitly contrast with tab_switch or tab_list, but the scoping and safety guidance provide enough context for correct use.

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

Deploy Server

Other Tools