Skip to main content
Glama
jasonwu001t

marketlens-mcp

by jasonwu001t

Stock quotes

market_quotes
Read-onlyIdempotent

Fetch historical best bid and ask quotes for US stocks, with prices in USD and sizes in shares. Window by time range or lookback and query stored large results.

Instructions

Historical best bid and ask quotes for US stocks (prices USD, sizes in shares), one row per quote (Alpaca's round lots before 2025-11-03 are converted at 100 shares). A side with no active quote is null (no_data), never 0. Window by start/end or lookback (default PT20M); quotes are dense, keep windows short. Large results are stored, not shown: you get a result_id to query with results_query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoWindow end (same format). Default: now (Alpaca's latest available).
sortNoTime order of the rows: asc (oldest first, default) or desc (newest first).asc
startNoWindow start: ISO date (00:00 UTC) or datetime with a zone, e.g. 2026-01-02T14:30:00Z.
tickersYesStock tickers, e.g. ["AAPL", "BRK-B"] (1-200).
lookbackNoWindow length back from end as an ISO-8601 duration (P5D, P1Y, PT20M); only when start is omitted. Default PT20M.
page_tokenNoContinue a truncated fetch: the page_token from the previous response's pagination.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the description is free to add real behavioral context: round-lot conversion at 100 shares before 2025-11-03, null-vs-0 semantics for inactive sides, and the side effect that large result sets are stored rather than returned, yielding a result_id. That is meaningful disclosure beyond the annotations.

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?

Three compact sentences, front-loaded with what the data is, then semantics, then the windowing/storage mechanics. No filler; each clause carries actionable information.

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?

With no output schema, the description still conveys the return shape (one row per quote), unit conventions, null handling, and the result_id indirection for large payloads, plus pagination via page_token in the schema. Nothing essential to correct invocation 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 description coverage is 100%, so the baseline is 3, but the description adds practical meaning: the start/end vs lookback relationship, the default window length, and the operational implication that windows should be short because quotes are dense. This informs parameter choice rather than merely restating field docs.

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 and qualifier: 'Historical best bid and ask quotes for US stocks', with the 'Historical' qualifier implicitly separating it from market_latest_quotes. The row-granularity and currency/unit semantics (USD prices, share sizes) make the returned artifact 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?

Gives concrete operating guidance: window via start/end or lookback (default PT20M), and an explicit warning that quotes are dense so windows should be kept short. It also routes the agent to results_query for large results. It stops short of naming sibling alternatives (e.g. market_latest_quotes for real-time) or stating exclusions.

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