Skip to main content
Glama

Write an indicator of your own

custom_indicator
Read-onlyIdempotent

Write and register a custom IndicatorPlugin (descriptor, calculate, update, render) before a saved layout loads so the chart, legend, axis, and CSV export use it.

Instructions

How to write and register an indicator of your own (an IndicatorPlugin, usually a class extending IndicatorBase): the descriptor (plots and their kinds, markers among them; inputs and labelled choices; scale, levels, category, defaultStyle by theme), calculate, the incremental update and when revisesBefore is needed, render, registering it before a saved layout is read (ChartWidget plugins), and what the legend, the axis, the CSV export and the settings take from the descriptor. Markdown with TypeScript that is type-checked against the published packages.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "custom_indicator"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.16.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/local, so the safety profile is covered. The description adds real value beyond that by disclosing what you actually get back: Markdown documentation containing TypeScript samples that are type-checked against the published packages. That tells the agent the result is reference material, not executed code, which is the key behavioral fact here.

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 the purpose, then an enumerated list of covered topics, so an agent can scan for relevance. It is a single dense run-on sentence with heavy parenthetical nesting, which slightly hurts readability but every clause carries substantive content.

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 parameters and no output schema, the description's job is to say what knowledge the document covers, and it does so in detail (descriptor structure, calculate, incremental update and revisesBefore, render, registration timing, downstream consumers of the descriptor). Only minor gaps remain, such as output size or whether it covers every plugin extension point.

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 the schema leaves nothing to explain. Baseline of 4 applies; the description correctly spends no space on parameter discussion.

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 and resource: 'How to write and register an indicator of your own (an IndicatorPlugin, usually a class extending IndicatorBase)'. This clearly separates it from a lookup-style sibling like get_indicator by emphasizing authoring your own plugin. It doesn't name a sibling to contrast against, but the authoring framing is unambiguous.

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

Usage Guidelines3/5

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

Usage is implied by the content list: consult this when you need to build or register a custom indicator. However, it never states when NOT to use it (e.g. when an existing indicator from list_indicators already fits) or points to alternatives such as get_indicator for reading docs on existing indicators. Guidance is inferable but not explicit.

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