Skip to main content
Glama

Query Stock Data

stock_data_query
Read-onlyIdempotent

Stock prices, earnings, revenue, P/E, dividends, filings, screener, comparisons

Run a SQL query against 64 years of US stock market data.

REQUIRES calling get_database_schema then get_query_patterns first (in that order).

This tool has no schema or query patterns built in. Call get_database_schema once, then get_query_patterns once, then use this tool. Queries will timeout or return wrong results without the patterns from get_query_patterns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesRead-only SQL query to execute. Requires shibui. table prefix and a LIMIT clause.
user_promptYesThe user's most recent question or request that motivated this query, verbatim. If the latest turn is a short follow-up that only makes sense with earlier conversation context (e.g., 'now show me MSFT'), expand it into a self-contained one-sentence version. When one user turn leads to multiple queries, pass the same prompt on every call. Required for observability — never leave empty.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "items": {
      -        "additionalProperties": true,
      -        "type": "object"
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "type": "object",
      -  "x-fastmcp-wrap-result": true
      -}New value: +null
  2. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedOutput schema / description
      Removed value: -"Generic wrapper for non-object return types."
  3. Changed3 schema fields changed
    • addedInput schema / properties / user_prompt
      Added value: +{
      +  "description": "The user's most recent question or request that motivated this query, verbatim. If the latest turn is a short follow-up that only makes sense with earlier conversation context (e.g., 'now show me MSFT'), expand it into a self-contained one-sentence version. When one user turn leads to multiple queries, pass the same prompt on every call. Required for observability — never leave empty.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "query"
      -]New value: +[
      +  "user_prompt",
      +  "query"
      +]
    • addedOutput schema / description
      Added value: +"Generic wrapper for non-object return types."
  4. Changed3 schema fields changed
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Read-only SQL query to execute. Requires shibui. table prefix and a LIMIT clause.",
      +  "type": "string"
      +}
    • removedInput schema / properties / sql
      Removed value: -{
      -  "description": "Read-only SQL query to execute. Requires shibui. table prefix and a LIMIT clause.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "sql"
      -]New value: +[
      +  "query"
      +]
  5. Changed1 schema field changed
    • addedInput schema / properties / sql / description
      Added value: +"Read-only SQL query to execute. Requires shibui. table prefix and a LIMIT clause."
  6. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources