Skip to main content
Glama

Get market breadth

get_market_breadth
Read-onlyIdempotent

Return the latest S&P 500 sector breadth and S&P 500, Nasdaq-100 and PHLX Semiconductor (SOX) constituent percentages above their 20-session simple moving averages, with SPX, NDX and SOX price-index benchmark levels (no dividends). History uses the loader's constituent lists, not point-in-time membership. Optionally choose 1–252 recent trading sessions; default 20.

Input Schema

NameRequiredDescriptionDefault
daysNoRecent trading sessions to return in history; integer from 1 to 252, default 20.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "asOf": {
      -        "description": "Latest upstream quote timestamp among priced S&P 500 stocks; not necessarily the latest breadth session date.",
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "constituents": {
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "generatedAt": {
      -        "description": "Time this snapshot was calculated; cached responses retain this timestamp.",
      -        "type": "string"
      -      },
      -      "history": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "all": {
      -              "description": "Percentage of eligible S&P 500 stocks above their 20-session simple moving average.",
      -              "maximum": 100,
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "date": {
      -              "description": "Trading-session date; use this, not asOf, to identify the reading's session.",
      -              "type": "string"
      -            },
      -            "nasdaq100": {
      -              "anyOf": [
      -                {
      -                  "maximum": 100,
      -                  "minimum": 0,
      -                  "type": "integer"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "Nasdaq-100 percentage above SMA20; null when coverage is insufficient."
      -            },
      -            "soxx": {
      -              "anyOf": [
      -                {
      -                  "maximum": 100,
      -                  "minimum": 0,
      -                  "type": "integer"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "SOXX holdings percentage above SMA20; null when coverage is insufficient."
      -            },
      -            "total": {
      -              "description": "Sum of the eleven rounded sector percentages; not a stock count or a percentage.",
      -              "maximum": 1100,
      -              "minimum": 0,
      -              "type": "integer"
      -            }
      -          },
      -          "required": [
      -            "date",
      -            "total",
      -            "all",
      -            "nasdaq100",
      -            "soxx"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "index": {
      -        "type": "string"
      -      },
      -      "latest": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "all": {
      -            "description": "Percentage of eligible S&P 500 stocks above their 20-session simple moving average.",
      -            "maximum": 100,
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "benchmarks": {
      -            "additionalProperties": {
      -              "type": [
      -                "number",
      -                "null"
      -              ]
      -            },
      -            "propertyNames": {
      -              "type": "string"
      -            },
      -            "type": "object"
      -          },
      -          "date": {
      -            "description": "Trading-session date; use this, not asOf, to identify the reading's session.",
      -            "type": "string"
      -          },
      -          "nasdaq100": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "description": "Nasdaq-100 percentage above SMA20; null when coverage is insufficient."
      -          },
      -          "sectors": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "above": {
      -                  "description": "Percentage of eligible sector stocks above their 20-session simple moving average.",
      -                  "maximum": 100,
      -                  "minimum": 0,
      -                  "type": "integer"
      -                },
      -                "code": {
      -                  "type": "string"
      -                },
      -                "name": {
      -                  "type": "string"
      -                },
      -                "stocks": {
      -                  "maximum": 9007199254740991,
      -                  "minimum": 0,
      -                  "type": "integer"
      -                }
      -              },
      -              "required": [
      -                "code",
      -                "name",
      -                "stocks",
      -                "above"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "soxx": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "description": "SOXX holdings percentage above SMA20; null when coverage is insufficient."
      -          },
      -          "total": {
      -            "description": "Sum of the eleven rounded sector percentages; not a stock count or a percentage.",
      -            "maximum": 1100,
      -            "minimum": 0,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "date",
      -          "total",
      -          "all",
      -          "nasdaq100",
      -          "soxx",
      -          "sectors",
      -          "benchmarks"
      -        ],
      -        "type": "object"
      -      },
      -      "movingAverage": {
      -        "maximum": 9007199254740991,
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "priced": {
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "generatedAt",
      -      "asOf",
      -      "index",
      -      "movingAverage",
      -      "constituents",
      -      "priced",
      -      "latest",
      -      "history"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "error": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "asOf": {
      +        "description": "Latest upstream quote timestamp among priced S&P 500 stocks; not necessarily the latest breadth session date.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "constituents": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "generatedAt": {
      +        "description": "Time this snapshot was calculated; cached responses retain this timestamp.",
      +        "type": "string"
      +      },
      +      "history": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "all": {
      +              "description": "Percentage of eligible S&P 500 stocks above their 20-session simple moving average.",
      +              "maximum": 100,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "date": {
      +              "description": "Trading-session date; use this, not asOf, to identify the reading's session.",
      +              "type": "string"
      +            },
      +            "nasdaq100": {
      +              "anyOf": [
      +                {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Nasdaq-100 percentage above SMA20; null when coverage is insufficient."
      +            },
      +            "sox": {
      +              "anyOf": [
      +                {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "PHLX Semiconductor constituent percentage above SMA20; null when coverage is insufficient."
      +            },
      +            "total": {
      +              "description": "Sum of the eleven rounded sector percentages; not a stock count or a percentage.",
      +              "maximum": 1100,
      +              "minimum": 0,
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "date",
      +            "total",
      +            "all",
      +            "nasdaq100",
      +            "sox"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "index": {
      +        "type": "string"
      +      },
      +      "latest": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "all": {
      +            "description": "Percentage of eligible S&P 500 stocks above their 20-session simple moving average.",
      +            "maximum": 100,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "benchmarks": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "NDX": {
      +                "description": "Nasdaq-100 price index level (^NDX); no dividends.",
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "SOX": {
      +                "description": "PHLX Semiconductor price index level (^SOX); no dividends.",
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "SPX": {
      +                "description": "S&P 500 price index level (^GSPC); no dividends.",
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "required": [
      +              "SPX",
      +              "NDX",
      +              "SOX"
      +            ],
      +            "type": "object"
      +          },
      +          "date": {
      +            "description": "Trading-session date; use this, not asOf, to identify the reading's session.",
      +            "type": "string"
      +          },
      +          "nasdaq100": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Nasdaq-100 percentage above SMA20; null when coverage is insufficient."
      +          },
      +          "sectors": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "above": {
      +                  "description": "Percentage of eligible sector stocks above their 20-session simple moving average.",
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "code": {
      +                  "type": "string"
      +                },
      +                "name": {
      +                  "type": "string"
      +                },
      +                "stocks": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                }
      +              },
      +              "required": [
      +                "code",
      +                "name",
      +                "stocks",
      +                "above"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "sox": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "PHLX Semiconductor constituent percentage above SMA20; null when coverage is insufficient."
      +          },
      +          "total": {
      +            "description": "Sum of the eleven rounded sector percentages; not a stock count or a percentage.",
      +            "maximum": 1100,
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "date",
      +          "total",
      +          "all",
      +          "nasdaq100",
      +          "sox",
      +          "sectors",
      +          "benchmarks"
      +        ],
      +        "type": "object"
      +      },
      +      "movingAverage": {
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "priced": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "generatedAt",
      +      "asOf",
      +      "index",
      +      "movingAverage",
      +      "constituents",
      +      "priced",
      +      "latest",
      +      "history"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld/non-destructive, so the safety profile is covered. The description adds genuinely useful behavioral context that annotations cannot: no dividends in the benchmark levels, and the important caveat that history is built from the loader's current constituent lists rather than point-in-time membership — a material data-quality limitation for any agent interpreting the series.

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-loads the returned data, then appends the two critical caveats and the parameter default. It is dense and slightly run-on, but nearly every clause adds information; only the repeated 'default 20' overlaps with the schema.

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 an output schema covering return shape and annotations covering safety, the description's remaining job is data provenance and caveats — which it handles via the no-dividends note and the point-in-time membership warning. Nothing needed to call or interpret the tool correctly is missing.

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 already documents the 1–252 range and default of 20; the description only restates '1–252 recent trading sessions; default 20' without adding format or edge-case meaning. Baseline 3 is appropriate when the schema carries the parameter semantics.

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 ('Return') and precisely names the resources: S&P 500 sector breadth, constituent percentages above 20-session SMAs for SPX/NDX/SOX, plus the index benchmark levels. The scope is unambiguous and cannot be confused with any sibling (research reports, pages, signals).

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 only implied — the description explains what data is produced and how the optional `days` history window works, but never says when to call this versus another tool or when it is inappropriate. Siblings are in unrelated domains, so the risk of mis-selection is low, keeping this at minimum-viable rather than poor.

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