Skip to main content
Glama

get_stock_price

Read-onlyIdempotent

Get historical daily stock prices (OHLC). Returns a summary by default; set series=true to get the full daily price series (for backtesting / charting).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax rows of the daily series to return when series=true.
periodNoLook-back window1y
seriesNoIf true, return the full daily OHLC series (up to `limit` rows) instead of just a summary.
tickerYesStock ticker symbol

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesThe rows rendered: the full series (series=true, up to limit) or the latest 10
latestYes
periodYes
tickerYes
plan_limitYesThe Free/keyless plan limits ko.io applied to this answer (null for paid callers)
period_startYes
rows_returnedYes
days_requestedYes
period_low_closeYes
total_return_pctYes(latest close - period-start close) / period-start close x 100, from the returned rows
period_high_closeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "days_requested": {
      +      "type": "integer"
      +    },
      +    "latest": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "close": {
      +              "anyOf": [
      +                {
      +                  "pattern": "^-?\\d+(\\.\\d+)?([eE][-+]?\\d+)?$",
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Exact decimal string as served by ko.io (not rounded); null = unknown"
      +            },
      +            "date": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "date",
      +            "close"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "period": {
      +      "type": "string"
      +    },
      +    "period_high_close": {
      +      "$ref": "#/properties/latest/anyOf/0/properties/close"
      +    },
      +    "period_low_close": {
      +      "$ref": "#/properties/latest/anyOf/0/properties/close"
      +    },
      +    "period_start": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "close": {
      +              "$ref": "#/properties/latest/anyOf/0/properties/close"
      +            },
      +            "date": {
      +              "$ref": "#/properties/latest/anyOf/0/properties/date"
      +            }
      +          },
      +          "required": [
      +            "date",
      +            "close"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "plan_limit": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "continuation": {
      +              "$ref": "#/properties/latest/anyOf/0/properties/date"
      +            },
      +            "date_basis": {
      +              "$ref": "#/properties/latest/anyOf/0/properties/date"
      +            },
      +            "effective_period": {
      +              "$ref": "#/properties/latest/anyOf/0/properties/date"
      +            },
      +            "policy_version": {
      +              "$ref": "#/properties/latest/anyOf/0/properties/date"
      +            },
      +            "row_cap": {
      +              "anyOf": [
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "truncated": {
      +              "type": [
      +                "boolean",
      +                "null"
      +              ]
      +            },
      +            "window_end": {
      +              "$ref": "#/properties/latest/anyOf/0/properties/date"
      +            },
      +            "window_start": {
      +              "$ref": "#/properties/latest/anyOf/0/properties/date"
      +            }
      +          },
      +          "required": [
      +            "policy_version",
      +            "window_start",
      +            "window_end",
      +            "effective_period",
      +            "date_basis",
      +            "row_cap",
      +            "truncated",
      +            "continuation"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "The Free/keyless plan limits ko.io applied to this answer (null for paid callers)"
      +    },
      +    "rows": {
      +      "description": "The rows rendered: the full series (series=true, up to limit) or the latest 10",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "close": {
      +            "$ref": "#/properties/latest/anyOf/0/properties/close"
      +          },
      +          "date": {
      +            "$ref": "#/properties/latest/anyOf/0/properties/date"
      +          },
      +          "high": {
      +            "$ref": "#/properties/latest/anyOf/0/properties/close"
      +          },
      +          "low": {
      +            "$ref": "#/properties/latest/anyOf/0/properties/close"
      +          },
      +          "open": {
      +            "$ref": "#/properties/latest/anyOf/0/properties/close"
      +          },
      +          "volume": {
      +            "$ref": "#/properties/latest/anyOf/0/properties/close"
      +          }
      +        },
      +        "required": [
      +          "date",
      +          "open",
      +          "high",
      +          "low",
      +          "close",
      +          "volume"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "rows_returned": {
      +      "type": "integer"
      +    },
      +    "ticker": {
      +      "type": "string"
      +    },
      +    "total_return_pct": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/properties/latest/anyOf/0/properties/close/anyOf/0"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "(latest close - period-start close) / period-start close x 100, from the returned rows"
      +    }
      +  },
      +  "required": [
      +    "ticker",
      +    "period",
      +    "days_requested",
      +    "rows_returned",
      +    "latest",
      +    "period_start",
      +    "total_return_pct",
      +    "period_high_close",
      +    "period_low_close",
      +    "rows",
      +    "plan_limit"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover read-only, open-world, idempotent, and non-destructive behavior. The description adds valuable behavioral nuance by disclosing that a summary is returned by default and that series=true switches to a full daily series. This output-shape behavior goes beyond the annotations and contains no contradiction.

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?

Two sentences with no wasted words. The core action is front-loaded, and the mode switch is explained succinctly without repeating structured schema details.

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?

For a read-only price lookup with a fully documented schema, supportive annotations, and an output schema, the description tells the agent everything essential: what the tool returns and how to request the full series. The behavioral choice is the only real decision point, and it is covered.

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%, so the schema already documents ticker, series, period, and limit fully. The description adds only a mild use-case hint for series=true (backtesting/charting), which doesn't meaningfully expand parameter understanding beyond the baseline.

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 and resource: 'Get historical daily stock prices (OHLC)'. It also identifies a key variant (summary vs full series), which clearly distinguishes it from siblings like get_stock_activity, get_stock_financials, and get_stock_profile.

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 gives clear context for when to use the tool: historical price data, and specifically backtesting or charting when series=true. However, it doesn't name alternatives or explicitly state when not to use this tool among the many stock-related siblings.

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.