Skip to main content
Glama

Relative strength (A/B)

get_relative_strength
Read-onlyIdempotent

Relative strength of one ticker against another as a price ratio A/B (e.g. GDX/GLD, HYG/LQD, XLK/SPY, NVDA/SPY): how far the ratio sits above or below its 50- and 200-day averages, the ratio's RSI and trend, recent values, and a one-line verdict on which side is leading.

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. Changed10 schema fields changed
    • changedOutput schema / properties / current_ratio / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / data_points / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / pair / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / period_change_pct / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / ratio_rsi_14 / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / ratio_sma200 / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / ratio_sma50 / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / recent_values / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / signals / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / trend / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  2. 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"
      +}
  3. 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 readOnlyHint=true, idempotentHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is fully covered. The description adds value beyond that by disclosing what the analysis computes (distance from 50/200-day averages, RSI, trend, recent values, one-line verdict), though much of this overlaps with the existing output schema.

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?

A single dense sentence, front-loaded with the core purpose and followed by the computed outputs. Every clause carries meaning, though the output enumeration makes it longer than strictly necessary given an output schema exists.

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 an output schema present, return values need not be spelled out, and annotations carry the safety profile, so the description is largely complete for a 3-parameter read-only analytics tool. It lacks any explicit guidance on period_days selection tradeoffs, a minor gap.

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 the schema already documents ticker_a as numerator, ticker_b as denominator, and period_days defaults/limits. The description reinforces the A/B orientation with example ratios, but adds no syntax or format details beyond the schema—baseline 3 applies.

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?

States a specific verb+resource (relative strength of one ticker against another as a price ratio A/B) and names concrete example pairs (GDX/GLD, HYG/LQD). This clearly distinguishes it from generic siblings like get_technical_indicators or get_price_history without needing to open 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 Guidelines3/5

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

Usage is implied by the example pairs (e.g. GDX/GLD for gold miners vs gold, XLK/SPY for sector vs benchmark), which hints at when the tool is appropriate. However, there is no explicit when-to-use vs alternatives statement and no exclusions relative to get_technical_indicators or get_intermarket.

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