Skip to main content
Glama

get_latest_signals

Retrieve current stock selection scores from the Qlib ML pipeline, ranked by predicted relative returns to guide trading and allocation decisions.

Instructions

Retrieve the latest quantitative stock selection signals produced by the Qlib ML pipeline.

Use this tool before making any trading or allocation decisions. Signals are ranked
cross-sectionally with higher scores indicating higher predicted relative returns.

Parameters:
    top_n: Number of top-ranked instruments to return. Default is 0, which returns
           all ranked instruments in the universe. Must be >= 0.

Returns:
    A dictionary containing:
    - as_of: Effective date of the signals (YYYY-MM-DD).
    - generated_at: UTC timestamp when the signals were generated.
    - source_model: Name of the model architecture (e.g. LightGBM, Alpha158).
    - data_source: Underlying market data feed.
    - horizon_days: Prediction horizon in trading days.
    - checksum: SHA-256 integrity checksum of the signals payload.
    - signals: List of ranked instruments with rank (1..N), symbol, and score.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full disclosure burden and meets it: it explains the ranking semantics ('higher scores indicating higher predicted relative returns'), the top_n=0 default behavior, and enumerates the exact return payload including checksum and timestamps. This goes well beyond a mere 'getter' statement.

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?

The description is well organized into purpose, usage, parameter, and return sections. It is detailed but each sentence adds information; nothing is filler or repetitive.

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 single-optional-parameter read tool, the description covers when to use it, what the data represents, how ranking works, and the complete return schema. There is no obvious missing context an agent would need to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description fully compensates by defining top_n's meaning, its default, the 'all instruments' behavior when 0, and the required non-negativity constraint. No parameter ambiguity remains.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Retrieve'), a specific resource ('latest quantitative stock selection signals produced by the Qlib ML pipeline'), and clarifies that scores are cross-sectionally ranked. It does not explicitly differentiate from sibling tools list_universe and signal_health, so it stops just short of a 5.

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 phrase 'Use this tool before making any trading or allocation decisions' gives a clear, explicit use case. However, it does not mention when not to use it or contrast it with signal_health/list_universe, so exclusions and alternatives are absent.

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

Deploy Server

Other Tools