Skip to main content
Glama

is_market_open

Read-only

Check whether an exchange is currently open — a cheap routing helper.

Returns `is_open`, a single boolean. An unknown exchange code is an error.

Use it to route between the market-hours tools: when the market is CLOSED,
extended-hours data lives in `get_aftermarket_data`;
when OPEN, `detect_intraday_outlier_jumps` gives the live intraday read.
No auth required.

Unsure which exchange a ticker trades on? `get_company_snapshot` returns an
`exchange` field whose value can be passed here as-is.

Input Schema

NameRequiredDescriptionDefault
exchangeNoExchange code, e.g. "NYSE", "NASDAQ", "LSE" or an ISO MIC like "XNYS" (not full names; case does not matter). NYSE is right for US equities.NYSE

Output Schema

NameRequiredDescriptionDefault
is_openYesTrue when the exchange is in its regular session right now.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / exchange / description
      Previous value: -"CASE-SENSITIVE uppercase exchange code, e.g. \"NYSE\", \"NASDAQ\", \"LSE\" (not full names). NYSE is right for US equities."New value: +"Exchange code, e.g. \"NYSE\", \"NASDAQ\", \"LSE\" or an ISO MIC like \"XNYS\" (not full names; case does not matter). NYSE is right for US equities."
    • removedOutput schema / $defs
      Removed value: -{
      -  "ExchangeHours": {
      -    "additionalProperties": true,
      -    "properties": {
      -      "closingHour": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Session close with UTC offset.",
      -        "title": "Closinghour"
      -      },
      -      "exchange": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Exchange"
      -      },
      -      "isMarketOpen": {
      -        "anyOf": [
      -          {
      -            "type": "boolean"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "The answer: is the exchange open right now.",
      -        "title": "Ismarketopen"
      -      },
      -      "name": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Name"
      -      },
      -      "openingHour": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Session open with UTC offset.",
      -        "title": "Openinghour"
      -      },
      -      "timezone": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Timezone"
      -      }
      -    },
      -    "title": "ExchangeHours",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / exchanges
      Removed value: -{
      -  "description": "One record for the requested exchange; read its isMarketOpen.",
      -  "items": {
      -    "$ref": "#/$defs/ExchangeHours"
      -  },
      -  "title": "Exchanges",
      -  "type": "array"
      -}
    • addedOutput schema / properties / is_open
      Added value: +{
      +  "description": "True when the exchange is in its regular session right now.",
      +  "title": "Is Open",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "exchanges"
      -]New value: +[
      +  "is_open"
      +]
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds real context beyond them: it is cheap, it requires no auth, it returns a single boolean, and an unknown exchange code raises an error rather than defaulting. It doesn't cover edge cases like holidays or stale data, so not a full 5, but the disclosure is well above the annotation baseline.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the purpose, then return value, then error behavior, then routing. Every sentence carries distinct information with no repetition of the schema beyond the error rule.

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?

Output schema exists so return format needn't be re-explained, annotations cover safety, schema covers the parameter. The description fills the remaining gaps: cost model, auth, error semantics, and sibling routing. Nothing an agent needs to call this 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 already 100%, so the baseline is 3, but the description adds meaning the schema cannot: it points to `get_company_snapshot`'s `exchange` field as a compatible source for the value, which directly answers where the parameter comes from.

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 ('check whether an exchange is currently open') and frames the tool's role as a 'cheap routing helper', which immediately distinguishes it from the market-data siblings. An agent knows exactly what it does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly routes the agent: when CLOSED use `get_aftermarket_data`, when OPEN use `detect_intraday_outlier_jumps`, and when the exchange is unknown use `get_company_snapshot` to obtain the code. This is textbook when-to-use/when-to-use-something-else guidance naming concrete alternatives.

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