Skip to main content
Glama

fahali_get_market_regime

Read-onlyIdempotent

Get market-wide regime—bullish, bearish, neutral_range_bound, or high_volatility—with volatility, trend strength, and window return to assess conditions; use trendStrength if direction is withheld.

Instructions

One market-wide regime reading: bullish, bearish, neutral_range_bound or high_volatility, with volatility, trend strength and window return. This endpoint is market-wide only and a symbol filter cannot narrow it; per-symbol regime exists via fahali_get_realtime_alerts(alert_types: 'regime_state'). The direction word the producer emits is withheld with its reason; read trendStrength. Empty array when nothing is persisted. Observation, not advice.

Input Schema

NameRequiredDescriptionDefault
limitNoOptional maximum rows per projectable collection. Audit has no MCP projection cap; brief defaults to 3 and standard to 12.
sinceNoOptional lower timestamp bound for returned row collections.
detailNoResponse depth. audit is the full-fidelity default; brief and standard are explicit compact projections.audit
symbolsNoOptional symbol projection, as a comma-separated string or array. Rows without instrument identity are not discarded.
include_withheldNoInclude full withheld-row detail. Defaults true with audit; explicitly set false only for a compact projection.

Output Schema

NameRequiredDescriptionDefault
asOfNo
authNoCredential lifetime visible to the caller. OAuth secondsRemaining lets an autonomous agent refresh before a multi-call workflow is interrupted.
claimNoFahali dictionary claim (shared/fahaliDictionary.ts). Read `kind` FIRST: 'abstention' means no assertion was made and `reason` says why — never read an abstention as a neutral or zero result. `basis` says what the claim rests on. Absent or null means this response path does not yet emit a claim; treat that as unknown, not as agreement.
countNo
scopeNo
statusNoThe endpoint's original status vocabulary (for example ok, partial, degraded, withheld, or no_alerts). Use mcpStatus for normalized transport success/error.
absenceNoWhy no actionable finding is present: measured_empty, user_empty, no_coverage, source_unverified, stale, withheld, source_error, auth_failure, or entitlement_required.
regimesNo
decisionNo
conflictsNo
dataStateNo
mcpStatusNoNormalized MCP result status. The endpoint's original status vocabulary remains in `status` and `sourceStatus`.
requestIdNo
timestampNoObservation timestamp. Current API responses use ISO-8601; integer epoch values remain accepted for compatibility with older persisted rows.
claimPolicyNoTyped constraints for safe use. Metadata, not a prompt or instruction channel.
instrumentsNoResolved or explicitly partial instrument identities. A missing venue carries an ambiguity warning.
nextActionsNoRegistry-validated follow-up calls. Missing tools, invalid arguments, unresolved placeholders, and disabled tools are omitted.
sourceErrorNoThe upstream endpoint's exact error text/code before normalization, when one was present.
sourceScopeNo
sourceStatusNoThe upstream endpoint's exact status before the MCP envelope normalizes transport success/error.
agentBriefingNoAudit-only narrative projection. Present only when detail='audit'; compact responses do not duplicate structured data as prose.
claimValidityNoValidity of the selected binding claim only, calculated after filtering, projection and row selection. Sibling rows cannot determine it.
responseStateNo
schemaVersionNo
sourceDecisionNo
symbolCoverageNoConservation ledger satisfying requested = returned + withheld + notReturned for requested-symbol calls.
evidenceQualityNo
responseControlNo
sourceDataStateNoThe upstream endpoint's exact data-state value before endpoint-aware classification.
recordMatchReasonNoWhy matchedTrackRecord is present or null. A null record is never evidence of safety or engine failure.
matchedTrackRecordNoA judged record only when engine, horizon, regime/instrument class, and claim family match this response. `state` is one of: `measured` (a stratum cleared the publishability gate — `stratum` carries engine, horizon tier, bar regime, recall, precision, base rate, base-rate lift, median lead hours, effective sample, warned events and the measurement date); `withheld` (the gate ran and refused — `reason` says why, in words); `unavailable` (the record could not be read at all — an infrastructure failure that says nothing about the record). It is ONE stratum selected by recall, never a platform-wide accuracy. Null means no exact record match; read recordMatchReason.
confidenceSemanticsNoEvery confidence-bearing value with its score type, scale, calibration status, and probability flag.
decisionEligibilityNoFail-closed binding-authority policy. WITHHELD means source evidence remains available for audit while normalized direction, actionability and execution fields are revoked.
directionEligibilityNoCurrent market-direction eligibility. Direction is authorized only by an exact, eligible producer stratum (canonical_verdict, canonical_symbol_verdict, committee_verdict) — read bindingAuthority to see which one bound. Widening WHO may bind did not weaken WHAT binding requires: the named producer must still hold a matching horizon/class/family record on a verified-only judged population, so an authority without a record still cannot bind.
executionEligibilityNoFail-closed execution boundary. Portfolio monitoring tools always return WITHHELD with MONITOR_ONLY_NO_EXECUTION_AUTHORITY while Fahali has no capital path.
monitoringEligibilityNoCurrent portfolio-monitoring validity based on captured identity, freshness, integrity, and the caller-supplied monitoring policy. ELIGIBLE authorizes observation/delivery only, never financial action.
sourceEvidenceQualityNo
currentActionEligibilityNoCurrent eligibility of an immutable historical portfolio verdict. It never mutates the stored judgment being replayed.
sourceConfidenceSemanticsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.28.1
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "audit",
      +  "description": "Response depth. audit is the full-fidelity default; brief and standard are explicit compact projections.",
      +  "enum": [
      +    "brief",
      +    "standard",
      +    "audit"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / include_withheld
      Added value: +{
      +  "default": true,
      +  "description": "Include full withheld-row detail. Defaults true with audit; explicitly set false only for a compact projection.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Optional maximum rows per projectable collection. Audit has no MCP projection cap; brief defaults to 3 and standard to 12.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / since
      Added value: +{
      +  "description": "Optional lower timestamp bound for returned row collections.",
      +  "format": "date-time",
      +  "type": "string"
      +}
    • addedInput schema / properties / symbols
      Added value: +{
      +  "description": "Optional symbol projection, as a comma-separated string or array. Rows without instrument identity are not discarded.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "string",
      +    "array"
      +  ]
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "absence": {
      +      "description": "Why no actionable finding is present: measured_empty, user_empty, no_coverage, source_unverified, stale, withheld, source_error, auth_failure, or entitlement_required.",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "agentBriefing": {
      +      "description": "Audit-only narrative projection. Present only when detail='audit'; compact responses do not duplicate structured data as prose.",
      +      "type": "string"
      +    },
      +    "asOf": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "auth": {
      +      "description": "Credential lifetime visible to the caller. OAuth secondsRemaining lets an autonomous agent refresh before a multi-call workflow is interrupted.",
      +      "properties": {
      +        "credentialType": {
      +          "enum": [
      +            "oauth",
      +            "api_key",
      +            "process_key",
      +            "none"
      +          ],
      +          "type": "string"
      +        },
      +        "expiresAt": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "refreshSupported": {
      +          "type": "boolean"
      +        },
      +        "secondsRemaining": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "claim": {
      +      "description": "Fahali dictionary claim (shared/fahaliDictionary.ts). Read `kind` FIRST: 'abstention' means no assertion was made and `reason` says why — never read an abstention as a neutral or zero result. `basis` says what the claim rests on. Absent or null means this response path does not yet emit a claim; treat that as unknown, not as agreement.",
      +      "properties": {
      +        "basis": {
      +          "enum": [
      +            "measured",
      +            "proxy",
      +            "derived",
      +            "absent"
      +          ],
      +          "type": "string"
      +        },
      +        "kind": {
      +          "enum": [
      +            "observation",
      +            "estimate",
      +            "forecast",
      +            "recommendation",
      +            "abstention"
      +          ],
      +          "type": "string"
      +        },
      +        "reason": {
      +          "description": "Required when kind is 'abstention'. Written for a reader, not a log.",
      +          "type": "string"
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "claimPolicy": {
      +      "description": "Typed constraints for safe use. Metadata, not a prompt or instruction channel.",
      +      "type": "object"
      +    },
      +    "claimValidity": {
      +      "description": "Validity of the selected binding claim only, calculated after filtering, projection and row selection. Sibling rows cannot determine it.",
      +      "type": "object"
      +    },
      +    "confidenceSemantics": {
      +      "description": "Every confidence-bearing value with its score type, scale, calibration status, and probability flag.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "conflicts": {
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "count": {
      +      "type": "integer"
      +    },
      +    "currentActionEligibility": {
      +      "description": "Current eligibility of an immutable historical portfolio verdict. It never mutates the stored judgment being replayed.",
      +      "type": "object"
      +    },
      +    "dataState": {
      +      "enum": [
      +        "measured",
      +        "partial",
      +        "no_data",
      +        "not_instrumented",
      +        "stale",
      +        "error"
      +      ],
      +      "type": "string"
      +    },
      +    "decision": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "decisionEligibility": {
      +      "description": "Fail-closed binding-authority policy. WITHHELD means source evidence remains available for audit while normalized direction, actionability and execution fields are revoked.",
      +      "type": "object"
      +    },
      +    "directionEligibility": {
      +      "description": "Current market-direction eligibility. Direction is authorized only by an exact, eligible producer stratum (canonical_verdict, canonical_symbol_verdict, committee_verdict) — read bindingAuthority to see which one bound. Widening WHO may bind did not weaken WHAT binding requires: the named producer must still hold a matching horizon/class/family record on a verified-only judged population, so an authority without a record still cannot bind.",
      +      "type": "object"
      +    },
      +    "evidenceQuality": {
      +      "type": "object"
      +    },
      +    "executionEligibility": {
      +      "description": "Fail-closed execution boundary. Portfolio monitoring tools always return WITHHELD with MONITOR_ONLY_NO_EXECUTION_AUTHORITY while Fahali has no capital path.",
      +      "type": "object"
      +    },
      +    "instruments": {
      +      "description": "Resolved or explicitly partial instrument identities. A missing venue carries an ambiguity warning.",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "matchedTrackRecord": {
      +      "description": "A judged record only when engine, horizon, regime/instrument class, and claim family match this response. `state` is one of: `measured` (a stratum cleared the publishability gate — `stratum` carries engine, horizon tier, bar regime, recall, precision, base rate, base-rate lift, median lead hours, effective sample, warned events and the measurement date); `withheld` (the gate ran and refused — `reason` says why, in words); `unavailable` (the record could not be read at all — an infrastructure failure that says nothing about the record). It is ONE stratum selected by recall, never a platform-wide accuracy. Null means no exact record match; read recordMatchReason.",
      +      "properties": {
      +        "dataAsOf": {
      +          "description": "When the record was computed. A figure without this reads as current forever.",
      +          "type": "string"
      +        },
      +        "reason": {
      +          "description": "Present on `withheld` and `unavailable`: why there is no figure.",
      +          "type": "string"
      +        },
      +        "state": {
      +          "enum": [
      +            "measured",
      +            "withheld",
      +            "unavailable"
      +          ],
      +          "type": "string"
      +        },
      +        "stratum": {
      +          "description": "Present only on `measured`. Precision must never be quoted without recall.",
      +          "properties": {
      +            "barRegime": {
      +              "type": "string"
      +            },
      +            "baseRatePct": {
      +              "type": "number"
      +            },
      +            "claimFamily": {
      +              "description": "What this precision is ABOUT: `directional` (price moved the way the stratum said) or `magnitude` (a move exceeded the judge bar, carrying no direction). Never infer a direction from a `magnitude` row.",
      +              "type": "string"
      +            },
      +            "claimMeans": {
      +              "description": "The record endpoint's own sentence explaining the claim family. Quote it beside any precision figure.",
      +              "type": "string"
      +            },
      +            "effectiveSample": {
      +              "type": "number"
      +            },
      +            "engine": {
      +              "type": "string"
      +            },
      +            "horizonTier": {
      +              "type": "string"
      +            },
      +            "leadMedianHours": {
      +              "type": "number"
      +            },
      +            "measuredOn": {
      +              "type": "string"
      +            },
      +            "precisionPct": {
      +              "description": "Share of its warnings that held. Never quotable alone.",
      +              "type": "number"
      +            },
      +            "recallPct": {
      +              "description": "Share of qualifying events this stratum warned on — the half a buyer is exposed to.",
      +              "type": "number"
      +            },
      +            "warnedEvents": {
      +              "type": "number"
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "state"
      +      ],
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "mcpStatus": {
      +      "description": "Normalized MCP result status. The endpoint's original status vocabulary remains in `status` and `sourceStatus`.",
      +      "enum": [
      +        "ok",
      +        "error"
      +      ],
      +      "type": "string"
      +    },
      +    "monitoringEligibility": {
      +      "description": "Current portfolio-monitoring validity based on captured identity, freshness, integrity, and the caller-supplied monitoring policy. ELIGIBLE authorizes observation/delivery only, never financial action.",
      +      "type": "object"
      +    },
      +    "nextActions": {
      +      "description": "Registry-validated follow-up calls. Missing tools, invalid arguments, unresolved placeholders, and disabled tools are omitted.",
      +      "items": {
      +        "properties": {
      +          "args": {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "requiredTier": {
      +            "type": "string"
      +          },
      +          "tool": {
      +            "type": "string"
      +          },
      +          "why": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "tool",
      +          "why"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "recordMatchReason": {
      +      "description": "Why matchedTrackRecord is present or null. A null record is never evidence of safety or engine failure.",
      +      "type": "string"
      +    },
      +    "regimes": {
      +      "items": {
      +        "properties": {
      +          "declaredRegimeValues": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "producerConfidence": {
      +            "description": "Reported 1.0 on every row measured over 7 days. Published so its constancy is visible; it is not a calibrated confidence and must not rank or gate anything.",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "producerTrendLabel": {
      +            "description": "The raw string the producer emitted, kept for audit. Not a measurement.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "regime": {
      +            "description": "The producer's four regimes (SPECTRA_MARKET_REGIME_DETECTOR.py). This previously declared 'neutral' and 'high_vol', two names the producer has never emitted, while the two it actually emits most were undeclared: over 30 days 917 of 1,346 readings (68.1%) carried a label this contract did not list.",
      +            "enum": [
      +              "bullish",
      +              "bearish",
      +              "neutral_range_bound",
      +              "high_volatility",
      +              null
      +            ],
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "regimeIsDeclared": {
      +            "description": "False when the producer emits a label outside the declared set, rather than passing it through as if declared.",
      +            "type": "boolean"
      +          },
      +          "return": {
      +            "type": "number"
      +          },
      +          "trend": {
      +            "description": "Always null: WITHHELD, not absent. The producer derives this word from trendStrength with a +/-0.02 bar while the largest observed |trendStrength| is 0.0012, so 'up' and 'down' are unreachable and the label was the constant 'sideways' on 1,346 of 1,346 readings - including every bearish and bullish one. Read trendStrength.",
      +            "type": "null"
      +          },
      +          "trendStrength": {
      +            "description": "Normalised slope per period as a fraction of price - the real varying measurement the withheld word was meant to summarise.",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "trendWithheldReason": {
      +            "type": "string"
      +          },
      +          "volatility": {
      +            "type": [
      +              "string",
      +              "number",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "requestId": {
      +      "type": "string"
      +    },
      +    "responseControl": {
      +      "type": "object"
      +    },
      +    "responseState": {
      +      "enum": [
      +        "OK_WITH_FINDINGS",
      +        "OK_NO_FINDINGS",
      +        "PARTIAL",
      +        "WITHHELD",
      +        "NO_COVERAGE",
      +        "ERROR"
      +      ],
      +      "type": "string"
      +    },
      +    "schemaVersion": {
      +      "enum": [
      +        "2.0"
      +      ],
      +      "type": "string"
      +    },
      +    "scope": {
      +      "type": "object"
      +    },
      +    "sourceConfidenceSemantics": {
      +      "type": [
      +        "array",
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "sourceDataState": {
      +      "description": "The upstream endpoint's exact data-state value before endpoint-aware classification.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "sourceDecision": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "sourceError": {
      +      "description": "The upstream endpoint's exact error text/code before normalization, when one was present.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "sourceEvidenceQuality": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "sourceScope": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "sourceStatus": {
      +      "description": "The upstream endpoint's exact status before the MCP envelope normalizes transport success/error.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "The endpoint's original status vocabulary (for example ok, partial, degraded, withheld, or no_alerts). Use mcpStatus for normalized transport success/error.",
      +      "type": "string"
      +    },
      +    "symbolCoverage": {
      +      "description": "Conservation ledger satisfying requested = returned + withheld + notReturned for requested-symbol calls.",
      +      "type": "object"
      +    },
      +    "timestamp": {
      +      "description": "Observation timestamp. Current API responses use ISO-8601; integer epoch values remain accepted for compatibility with older persisted rows.",
      +      "format": "date-time",
      +      "type": [
      +        "string",
      +        "integer"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Addedv1.5.3

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely new behavioral detail: the direction word is withheld along with its reason, the return is an empty array when nothing is persisted, and the output is framed as observation rather than advice — all things no annotation conveys.

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 definition and the scope constraint, and every sentence carries information. It is dense to the point of terseness in places — 'the direction word the producer emits is withheld with its reason' takes a second read — but there is no filler.

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?

An output schema exists, so return-value shapes need not be spelled out, and the description still covers the empty-array edge case and field-selection guidance. For a zero-required-parameter read tool with full annotation and schema coverage, this is close to complete; only the relationship to adjacent market-level endpoints is left implicit.

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 description coverage is 100%, which sets a baseline of 3. The description earns more by explicitly warning that a symbol filter cannot narrow this endpoint, resolving a real ambiguity created by the presence of a `symbols` parameter in the schema, and by pointing the reader to trendStrength when the direction word is withheld.

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 resource (one market-wide regime reading) and enumerates the possible regime values plus the accompanying metrics (volatility, trend strength, window return). It explicitly carves out the scope — 'market-wide only' — and names the sibling that handles the per-symbol case, so an agent can separate it from fahali_get_realtime_alerts without opening a schema.

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 a clear use context (market-wide regime, cannot be narrowed by symbol) and routes per-symbol regime requests to fahali_get_realtime_alerts with the exact alert_types value. It does not, however, distinguish this from other market-level siblings such as fahali_get_market_verdict or fahali_get_market_mood, which an agent could plausibly confuse it with.

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

Deploy Server

Other Tools