Skip to main content
Glama

Relative strength (A/B)

get_relative_strength
Read-onlyIdempotent

Calculate relative strength ratio between two tickers (A/B). Returns verdict_ru and vs_sma50_pct — USE THOSE in your reply. The bare pair («0.2613 против своей 50-дневной 0.2840») is unreadable: the level depends only on the price scales, so quote the DISTANCE in percent and what it means, and give the raw numbers only if the client asks for them. Also returns SMA(50)/SMA(200) of ratio, RSI of ratio, trend direction. Used for inter-market analysis: e.g. GDX/GLD, HYG/LQD, XLK/SPY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticker_aYesNumerator ticker, e.g. 'GDX'
ticker_bYesDenominator ticker, e.g. 'GLD'
period_daysNoDays of history (default 365, max 1825)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairNo
trendNo
signalsNo
data_pointsNo
ratio_sma50No
ratio_rsi_14No
ratio_sma200No
current_ratioNo
recent_valuesNo
period_change_pctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "current_ratio": {
      +      "type": "number"
      +    },
      +    "data_points": {
      +      "type": "number"
      +    },
      +    "pair": {
      +      "type": "string"
      +    },
      +    "period_change_pct": {
      +      "type": "number"
      +    },
      +    "ratio_rsi_14": {
      +      "type": "number"
      +    },
      +    "ratio_sma200": {
      +      "type": "number"
      +    },
      +    "ratio_sma50": {
      +      "type": "number"
      +    },
      +    "recent_values": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "signals": {
      +      "type": "object"
      +    },
      +    "trend": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare this as a read-only, idempotent, non-destructive operation. The description adds useful behavioral context by naming key returned fields (verdict_ru, vs_sma50_pct) and explaining how output should be interpreted. It does not contradict the annotations.

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?

The description is front-loaded with the core calculation, then adds output guidance, returned fields, and use cases. It is somewhat verbose and includes mixed-language examples, but every section generally contributes to correct usage. It remains readable and reasonably compact.

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?

The tool has an output schema, so return values are structurally covered, and annotations cover safety traits. The description adds output interpretation guidance and use-case examples, making it largely complete for an inter-market relative strength tool. It would be stronger with explicit routing versus get_intermarket.

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%, so ticker_a, ticker_b, and period_days are already documented in the input schema. The description reinforces the A/B ratio concept and use cases but adds no parameter syntax or constraints beyond what the schema provides. A baseline of 3 is appropriate.

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?

The description states a specific verb and resource: calculating a relative strength ratio between two tickers (A/B). It also gives inter-market examples such as GDX/GLD. It does not explicitly distinguish itself from the sibling tool get_intermarket, so it is clear but not fully sibling-differentiated.

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 specifies the primary use case (inter-market analysis) with concrete ticker-pair examples. It also tells the agent how to use the result in a reply, including which fields to quote. However, it gives no explicit when-not-to-use guidance or direct alternatives among the sibling tools.

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