Skip to main content
Glama

QuantApe Markets

graph_neighbors

Read-only

The stocks that move most with a given ticker, ranked by strength, each with its cluster (a stable id and a label naming its biggest members) — peers, co-movers and offsetting names. Residual correlation is how much two stocks move together after the market and sector effects are removed from each, so it shows peers and true co-movement rather than shared market beta. type=lead_lag instead lists directed lagged relationships (one stock's move followed by another's a few sessions later; direction is from the symbol's point of view), which are weak and largely noise out of sample. Share classes are one company (GOOG is answered as GOOGL). Everything returned is descriptive statistics of past returns, not a recommendation. Free within your daily allowance (anonymous 5/day by IP, signed-in users 10/day, power users 50/day); beyond that $0.01 per call via x402 (USDC).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNoNeighbours to return, 1-50 (default 20).
typeNoresid_corr (default): same-day residual correlation. lead_lag: directed lagged correlation.
regimeNoall (default) | highvol | lowvol: volatility regime the correlation was measured in (VIX above / below its trailing median).
symbolYesTicker symbol, e.g. RGTI or BRK-B.
windowNoSessions behind resid_corr: 250 (default) or 60. Leave unset for lead_lag.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
regimeYes
symbolYes
windowYesSessions behind resid_corr (60 or 250); for lead_lag the sample size
clusterYesThe symbol's cluster (stable id + label) or null
run_dateYesDate of the nightly run the edges come from, YYYY-MM-DD
neighborsYes
peers_kindNo'neighbors' when the symbol is in no cluster (cluster_context then returns its closest peers)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / peers_kind
      Added value: +{
      +  "description": "'neighbors' when the symbol is in no cluster (cluster_context then returns its closest peers)",
      +  "enum": [
      +    "cluster",
      +    "neighbors"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only supply readOnlyHint, but the description adds substantial context: rate limits and pricing tiers (5/10/50 per day, $0.01 via x402), the share-class normalization rule (GOOG -> GOOGL), the direction convention for lead_lag (from the symbol's point of view), and a descriptive-not-recommendation disclaimer.

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?

Dense but front-loaded: the primary return shape comes first, then the mechanism, then caveats and pricing. Almost every sentence earns its place, though the pricing/rate-limit sentence is somewhat long and could be tightened.

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, annotations, and 100% schema coverage already present, the description need not explain return values — and it still covers semantics, edge cases, caveats, and cost. Nothing an agent needs to call it correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine conceptual meaning beyond the schema — it explains what residual correlation is (co-movement after removing market/sector effects) and what lead_lag represents, enriching the enum values with interpretation rather than just restating them.

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 with scope: the stocks that move most with a given ticker, ranked by strength, each with cluster info. It distinguishes the resid_corr vs lead_lag outputs and clearly sets this apart from siblings like cluster_context and get_stock_insights.

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?

Gives clear guidance on parameter choice: use the default resid_corr for peers/true co-movement, switch to lead_lag for directed lagged relationships — and warns that lead_lag is weak/noise out of sample. However, it never explicitly names sibling tools or states when this tool should be preferred over cluster_context.

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