Skip to main content
Glama

Strategy Counters

tt_get_strategy_counters
Read-onlyIdempotent

The runtime variables (counters) a deployed strategy is holding now.

This is what a trader means by "the counter" — the values the engine carries as the strategy runs: a remembered entry price (entry_px_s3_l1), a regime flag, a rotation pick. Each comes with the run it belongs to and when it last changed.

USE WHEN the user asks what a strategy "remembers", what its entry price was, why a condition has or hasn't fired, or wants to see its state mid-run. Pairs well with tt_diagnose_strategy: diagnosis says what happened, counters say what the strategy is currently holding.

Args: strategy_id: the DEPLOYED strategy id (SID) from tt_get_my_deployed_strategies — NOT a template id. name_prefix: optional filter, e.g. "entry_px" or "rfm_pick". Matched case-sensitively at the start of the name. changed_only: True drops the variables still at zero and untouched since the run began. On a grid deployment that is most of them — 88 of 153 — and the full list runs to 42,000 characters. The response always reports n_moved and n_zero_since_run_start either way.

An empty list is usually normal, not a fault — it means the strategy has not entered yet this run, or keeps no state. Say that rather than implying something is wrong.

Read-only, and available for live deployments as well as Live Offline — seeing your own numbers changes nothing.

AUTH-REQUIRED, and ownership-gated: a SID that isn't the user's is refused.

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": {
      "strategy_id": "<strategy_id>"
    },
    "name": "tt_get_strategy_counters"
  }
}

Input Schema

NameRequiredDescriptionDefault
name_prefixNo
strategy_idYes
changed_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered; the description adds genuinely new context: AUTH-REQUIRED, ownership gating that refuses a foreign SID, availability for live and Live Offline deployments, and a note that full output can reach 42,000 characters. The only real gap is that it doesn't quantify the access/permission failure mode beyond 'refused'.

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?

Front-loaded with a one-line definition followed by a usage block and an Args section, which is a clean structure. It is somewhat long and the 'what a trader means by the counter' framing, while helpful, could be tightened, but no sentence is functionally wasted.

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?

With no output schema, the description still conveys the return shape — each counter arrives with its owning run and last-change timestamp, plus `n_moved` and `n_zero_since_run_start` regardless of `changed_only`. Combined with the empty-result interpretation guidance and the auth/ownership note, an agent has everything needed to call and interpret this tool correctly.

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?

Schema coverage is 0%, so the description carries the full burden and does: `strategy_id` is pinned as a DEPLOYED SID (not a template id) sourced from `tt_get_my_deployed_strategies`; `name_prefix` is documented as case-sensitive prefix matching with examples; `changed_only` is explained as dropping zero/untouched variables on grid deployments, with concrete scale (88 of 153) and its interaction with `n_moved`.

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 opening line names the specific resource — runtime counters/variables held by a deployed strategy — and grounds it with concrete examples (`entry_px_s3_l1`, regime flag, rotation pick). It also contrasts with the sibling `tt_diagnose_strategy` (diagnosis = what happened, counters = what is held now), so an agent can distinguish them without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

An explicit USE WHEN block enumerates trigger phrasings ("what a strategy remembers", entry price, why a condition fired, state mid-run) and names the complementary tool. It also warns that an empty list is usually normal, which heads off a misdiagnosis path rather than leaving it to inference.

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