Skip to main content
Glama

get_index_data

Read-only

Get historical data for a CSE market/sector index. Returns CSV (date,open,high,low,close,change,change_pct,sector_turnover,sector_volume,sector_trades,price_index,per,pbv,dy,companies_traded,companies_listed), or JSON candidates if the input is ambiguous. Headline indices (ASPI, S&P SL20) populate open/high/low/close; industry sub-indices instead populate sector_turnover/sector_volume/sector_trades and leave high/low empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd date in YYYY-MM-DD format
fromNoStart date in YYYY-MM-DD format
indexYesThe index symbol, name, or common abbreviation (e.g. "ASPI", "SNP20", "S&P SL20", "Energy", "Banks"). Typos are tolerated. If the input is ambiguous, the response returns candidates instead of data; ask the user to pick one and call again with the exact symbol.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds substantial behavioral value beyond annotations: the exact CSV column format, the dual-mode return behavior (data vs. JSON candidates), and the index-type-specific field population (headline indices populate OHLC, sub-indices populate sector metrics and leave high/low empty). This is rich, actionable behavioral disclosure.

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 purpose is front-loaded in the first sentence and each subsequent sentence earns its place (return format, then index-type behavior). The CSV column enumeration is verbose but justified since there is no output schema to carry that information. Slightly dense but efficient.

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 no output schema present, the description correctly shoulders the burden of explaining return values — it covers the CSV format, the candidate-response mode, and the field-population nuance between index types. Minor gaps exist (no date-range limits, no pagination), but for a historical data tool this is reasonably complete.

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 coverage is 100%, so the schema already documents all three parameters thoroughly, including the ambiguity handling for 'index' and format details for from/to. The description reinforces the ambiguity concept but adds little parameter-specific meaning beyond what the schema provides, so the baseline of 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?

The description states a specific verb+resource ('Get historical data for a CSE market/sector index') that clearly distinguishes it from siblings like get_indices (listing indices), get_ohlc_data (likely for individual securities), and screen_indices (screening). The resource and scope are unambiguous.

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?

The description documents the ambiguity flow ('JSON candidates if the input is ambiguous') and the schema explicitly instructs the agent to ask the user to pick a candidate and call again with the exact symbol. This is clear contextual guidance, though it doesn't explicitly route the agent to alternatives (e.g., when to prefer get_ohlc_data over this tool).

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