Skip to main content
Glama

chart_state

Read-onlyIdempotent

What the deck's chart would show for one market, timeframe and window, as ONE JSON object computed in code: the bars (count, first and last, the last candle), the indicators drawn, the trader's own marked levels and zones (theirs — they may be used as levels the trader gave), the envelope under its draw gate and its facts, and the fact sheet of the window (open, close, high, low, range, change, volume, session). Use it instead of reading pixels: every number is measured, not read. Past windows only; at most 600 bars.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "market": "<market>",
      "tf": "<tf>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "chart_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
tfYestimeframe
toYeswindow end, ISO-8601 UTC, in the past (the logical clock for a replay)
fromYeswindow start, ISO-8601 UTC
marketYesthe market
indicatorsNoindicator ids to include, e.g. ["ema20","vwap","envelope"]; defaults to ema20 and envelope

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / tf / enum
      Previous value: -[
      -  "15s",
      -  "1m",
      -  "5m",
      -  "15m",
      -  "1h",
      -  "4h",
      -  "1d"
      -]New value: +[
      +  "1s",
      +  "15s",
      +  "1m",
      +  "5m",
      +  "15m",
      +  "1h",
      +  "4h",
      +  "1d"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / tf / enum
      Previous value: -[
      -  "15s",
      -  "1m",
      -  "5m",
      -  "1h"
      -]New value: +[
      +  "15s",
      +  "1m",
      +  "5m",
      +  "15m",
      +  "1h",
      +  "4h",
      +  "1d"
      +]
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description still contributes behavior the annotations cannot: values are measured in code rather than read from pixels, results are limited to past windows and capped at 600 bars, and the return payload is enumerated in detail (bars, indicators, marked levels/zones, envelope, fact sheet).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The purpose is front-loaded, which is good, but the whole body is one long run-on sentence with deep parenthetical nesting. Clauses like 'the envelope under its draw gate and its facts' and 'theirs — they may be used as levels the trader gave' are hard to parse and cost the agent more reading than needed.

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?

With no output schema, the description must — and does — enumerate the returned payload (bars, indicators, levels/zones, envelope, fact sheet), which is the key completeness requirement here. It is missing edge-case behavior for windows exceeding the 600-bar cap and any error conditions, but nothing essential for a correct call is absent.

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

Parameters3/5

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

Schema description coverage is 100% and the enums for market and tf are already documented, so the schema carries most of the load. The description adds only the window semantics ('past windows only' for from/to) and hints that indicators are selectable via 'the indicators drawn' — useful but marginal over 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 names a specific resource (the deck's chart for one market/timeframe/window) and a specific output shape (ONE JSON object computed in code). It also distinguishes itself from the pixel-reading sibling by saying 'Use it instead of reading pixels', so an agent can pick it over chart_image without opening either schema.

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?

It gives an explicit alternative to compare against ('instead of reading pixels') plus usage limits: 'Past windows only; at most 600 bars.' It stops short of naming the sibling tool chart_image directly or covering when-to-use against desk_read/film/tape, so it is clear but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources