Skip to main content
Glama
pbajkovic-hub

tv-cdp-mcp

tv_set_alert_condition

Destructive

Merge new conditions, message, webhook, or name into a live TradingView alert and re-arm it. Returns previous state so you can revert the change.

Instructions

MUTATES a live alert: shallow-merge patch (camelCase model fields: conditions, message, webhook, name, resolution, ...) into the alert through the same modifyRestartAlert call path the TradingView UI uses - the ONLY path the server accepts (raw snake_case payload round-trips are rejected with invalid_request and were removed). Returns { id, patched_keys, sent, previous, current, was_active, paused_restored, current_raw } so the change is reversible - feed previous back as the next patch to undo it. Refuses an empty patch, identity fields (id/alert_id) and unknown field names. ARMED WINDOW: modify_restart always re-arms the alert; if it was paused before the call it is stopped again right after (~1s later, paused_restored: true) - a fire inside that window would deliver the alert's real message/webhook. Clone -> modify -> stop path verified live 2026-09-05 on defanged throwaway clones. Alerts on this account fire real webhooks that place live orders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesnumeric alert id, as returned by tv_list_alerts
patchYescamelCase model fields to shallow-merge into the alert: conditions, message, webhook, name, resolution, ...
layoutNochart layout id, target id, or 0-based index; default = the chart tab that is actually painting
expect_layoutNolayout id the tab is expected to show right now; the call refuses if it differs (a tab keeps its target id when the user opens another layout in it)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

The description goes far beyond the annotations by disclosing that the call modifies a live alert through modifyRestartAlert, re-arms the alert, can restore a paused state after ~1s, and may fire real webhooks placing live orders. It also exposes reversibility through returning `previous` and notes the live-tested clone/modify/stop path, giving an agent a full safety picture.

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?

The description is dense but every sentence earns its place: it front-loads the action, then explains the return payload, rejection rules, the re-arm window, and the live-order risk. The wording is efficient and ordered by importance.

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?

Given this is a mutating tool with no output schemabund, the description is remarkably complete: it covers return fields, error refusals, side effects, reversibility, and real-world danger. Nothing essential for an agent to invoke this tool safely is missing.

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?

Even though schema coverage is 100%, the description adds meaning beyond the schema: patch is explicitly a camelCase shallow-merge, identity fields are refused, unknown field names are refused, and `previous` can be fed back as a patch to undo the change. These are critical semantics for correct invocation.

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 a specific verb and resource: 'MUTATES a live alert' and explains the exact operation (shallow-merge `patch` into the alert). This clearly distinguishes it from sibling tools like tv_create_alert, tv_get_alert, tv_pause_alerts, and tv_delete_alerts.

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 states clear context for use: this is the only server-accepted path, raw snake_case payloads are rejected, and the tool refuses empty patches, identity fields, and unknown field names. It does not explicitly name sibling alternatives or when-not-to-use conditions, but it gives enough operational guidance to select it correctly.

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