Skip to main content
Glama
longbridge

longbridge

Official

Screener Search

screener_search
Read-onlyIdempotent

Screen stocks across US, HK, CN, SG markets using a saved strategy or custom filters for fundamentals and technical indicators.

Instructions

Screen stocks. market: US|HK|CN|SG (Mode B required; Mode A uses strategy's market). Mode A: strategy_id from screener_recommend_strategies — auto-runs saved strategy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_jqNoOptional jq filter (jaq syntax) applied to this tool's JSON response before it is returned; it never changes the upstream request. One output is returned as-is, several as a JSON array, none as []. Module imports and the `env`/`debug`/`stderr` builtins are unavailable. Example: .data | map({symbol}). Omit for the full response.
pageNoPage number, 0-based (default: 0)
sizeNoPage size (default: 20, max: 100)
marketNoMarket: "US" | "HK" | "CN" | "SG". Mode A: overridden by the market embedded in the strategy; pass any value or omit. Mode B: required — determines which market to screen.
conditionsNoMode B — Filter conditions, passed directly to the API. Omit for Mode A. Fundamental keys (pass with or without filter_ prefix): pettm pbmrq roe roa netmargin salesgrowthyoy netincomegrowthyoy marketcap(亿) circulating_marketcap(亿) prevclose prevchg(%) divyld la epsttm netincome(亿) sales(亿) turnover_rate balance(万) Technical indicator keys (tech_values required; call screener_indicators for schema): macd_day/week → {"category":"goldenfork"|"deadcross","period":"day"|"week"} rsi_day/week → {"value_type":"overbought"|"oversold"} kdj_day/week → {"category":"goldenfork"|"deadcross"} boll_day/week → {"category":"breakthrough_up"|"breakthrough_down"}
sort_orderNoSort order: "asc" | "desc" (default: "desc")
sort_by_keyNoIndicator key to sort results by (e.g. "marketcap", "roe"). Defaults to the first condition key. Must be one of the condition or extra_returns keys.
strategy_idNoMode A — Strategy ID from screener_recommend_strategies screeners[].id. The tool auto-fetches the strategy and builds filters. Omit for Mode B.
extra_returnsNoExtra indicator keys to include in each result row (display-only, not used as filters). Same key naming as conditions (filter_ prefix added automatically). Example: ["marketcap", "prevclose", "epsttm"]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.12.0
    • addedInput schema / properties / _jq / description
      Added value: +"Optional jq filter (jaq syntax) applied to this tool's JSON response before it is returned; it never changes the upstream request. One output is returned as-is, several as a JSON array, none as []. Module imports and the `env`/`debug`/`stderr` builtins are unavailable. Example: .data | map({symbol}). Omit for the full response."
    • removedInput schema / properties / page / format
      Removed value: -"uint32"
    • removedInput schema / properties / size / format
      Removed value: -"uint32"
  2. Changed2 schema fields changedv0.10.6
    • addedInput schema / properties / _jq
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "$defs": {
      -    "ScreenerResultIndicator": {
      -      "properties": {
      -        "key": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "unit": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "value": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "ScreenerResultItem": {
      -      "properties": {
      -        "indicators": {
      -          "items": {
      -            "$ref": "#/$defs/ScreenerResultIndicator"
      -          },
      -          "type": [
      -            "array",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "symbol": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    }
      -  },
      -  "properties": {
      -    "items": {
      -      "items": {
      -        "$ref": "#/$defs/ScreenerResultItem"
      -      },
      -      "type": [
      -        "array",
      -        "null"
      -      ]
      -    },
      -    "total": {
      -      "format": "int64",
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. Changed2 schema fields changedv0.8.7
    • changedInput schema / properties / conditions / description
      Previous value: -"Mode B — Filter conditions as objects, passed directly to the API.\nEach item: {\"key\": \"KEY\", \"min\": \"10\", \"max\": \"50\", \"tech_values\": {}}\nThe \"filter_\" prefix is added automatically to the key if missing.\n\nFundamental keys (pass with or without filter_ prefix):\n  pettm  pbmrq  roe  roa  netmargin\n  salesgrowthyoy  netincomegrowthyoy  marketcap(亿)\n  circulating_marketcap(亿)  prevclose  prevchg(%)\n  divyld  la  epsttm  netincome(亿)  sales(亿)  turnover_rate  balance(万)\n\nTechnical indicator keys (tech_values required; call screener_indicators for schema):\n  macd_day/week  → {\"category\":\"goldenfork\"|\"deadcross\",\"period\":\"day\"|\"week\"}\n  rsi_day/week   → {\"value_type\":\"overbought\"|\"oversold\"}\n  kdj_day/week   → {\"category\":\"goldenfork\"|\"deadcross\"}\n  boll_day/week  → {\"category\":\"breakthrough_up\"|\"breakthrough_down\"}"New value: +"Mode B — Filter conditions, passed directly to the API. Omit for Mode A.\n\nFundamental keys (pass with or without filter_ prefix):\n  pettm  pbmrq  roe  roa  netmargin\n  salesgrowthyoy  netincomegrowthyoy  marketcap(亿)\n  circulating_marketcap(亿)  prevclose  prevchg(%)\n  divyld  la  epsttm  netincome(亿)  sales(亿)  turnover_rate  balance(万)\n\nTechnical indicator keys (tech_values required; call screener_indicators for schema):\n  macd_day/week  → {\"category\":\"goldenfork\"|\"deadcross\",\"period\":\"day\"|\"week\"}\n  rsi_day/week   → {\"value_type\":\"overbought\"|\"oversold\"}\n  kdj_day/week   → {\"category\":\"goldenfork\"|\"deadcross\"}\n  boll_day/week  → {\"category\":\"breakthrough_up\"|\"breakthrough_down\"}"
    • changedInput schema / properties / conditions / items
      Previous value: -trueNew value: +{
      +  "properties": {
      +    "key": {
      +      "description": "Indicator key; the \"filter_\" prefix is added automatically if missing.\nFundamental: pettm, pbmrq, roe, roa, netmargin, salesgrowthyoy, netincomegrowthyoy, marketcap, circulating_marketcap, prevclose, prevchg, divyld, la, epsttm, netincome, sales, turnover_rate, balance.\nTechnical: macd_day, macd_week, rsi_day, rsi_week, kdj_day, kdj_week, boll_day, boll_week.",
      +      "type": "string"
      +    },
      +    "max": {
      +      "description": "Upper bound as a numeric string, e.g. \"50\". Pass an empty string when unbounded or for technical keys.",
      +      "type": "string"
      +    },
      +    "min": {
      +      "description": "Lower bound as a numeric string, e.g. \"10\". Pass an empty string when unbounded or for technical keys.",
      +      "type": "string"
      +    },
      +    "tech_values": {
      +      "description": "Technical-indicator params as a JSON string (empty string for fundamental keys):\nmacd_day/week: {\"category\":\"goldenfork\"|\"deadcross\",\"period\":\"day\"|\"week\"}\nrsi_day/week: {\"value_type\":\"overbought\"|\"oversold\"}\nkdj_day/week: {\"category\":\"goldenfork\"|\"deadcross\"}\nboll_day/week: {\"category\":\"breakthrough_up\"|\"breakthrough_down\"}",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "key"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changedv0.7.1
    • removedInput schema / title
      Removed value: -"ScreenerSearchParam"
  5. Changed14 schema fields changedv0.6.0
    • removedOutput schema / $defs / ScreenerResultIndicator / description
      Removed value: -"A single indicator value attached to a screener search result row. The\n`filter_` prefix is stripped from `key` by the tool."
    • removedOutput schema / $defs / ScreenerResultIndicator / properties / key / description
      Removed value: -"Indicator key (without the `filter_` prefix)."
    • removedOutput schema / $defs / ScreenerResultIndicator / properties / name / description
      Removed value: -"Indicator display name."
    • removedOutput schema / $defs / ScreenerResultIndicator / properties / unit / description
      Removed value: -"Value unit, where applicable."
    • removedOutput schema / $defs / ScreenerResultIndicator / properties / value / description
      Removed value: -"Indicator value (stringified by the transform pipeline)."
    • removedOutput schema / $defs / ScreenerResultItem / description
      Removed value: -"A single screener search result row. Subset of upstream fields."
    • removedOutput schema / $defs / ScreenerResultItem / properties / indicators / description
      Removed value: -"Per-indicator values for this row (condition + extra-return columns)."
    • removedOutput schema / $defs / ScreenerResultItem / properties / name / description
      Removed value: -"Display name of the security."
    • removedOutput schema / $defs / ScreenerResultItem / properties / symbol / description
      Removed value: -"Security symbol, e.g. \"AAPL.US\"."
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / description
      Removed value: -"Returned by `screener_search`. Documented portion is `total` plus the\n`items[]` result rows."
    • removedOutput schema / properties / items / description
      Removed value: -"Result rows for the current page."
    • removedOutput schema / properties / total / description
      Removed value: -"Total number of matching securities."
    • removedOutput schema / title
      Removed value: -"ScreenerSearchResponse"
  6. Changed1 schema field changedv0.5.6
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "ScreenerResultIndicator": {
      +      "description": "A single indicator value attached to a screener search result row. The\n`filter_` prefix is stripped from `key` by the tool.",
      +      "properties": {
      +        "key": {
      +          "description": "Indicator key (without the `filter_` prefix).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "description": "Indicator display name.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "unit": {
      +          "description": "Value unit, where applicable.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "value": {
      +          "description": "Indicator value (stringified by the transform pipeline).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "ScreenerResultItem": {
      +      "description": "A single screener search result row. Subset of upstream fields.",
      +      "properties": {
      +        "indicators": {
      +          "description": "Per-indicator values for this row (condition + extra-return columns).",
      +          "items": {
      +            "$ref": "#/$defs/ScreenerResultIndicator"
      +          },
      +          "type": [
      +            "array",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "description": "Display name of the security.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "symbol": {
      +          "description": "Security symbol, e.g. \"AAPL.US\".",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "description": "Returned by `screener_search`. Documented portion is `total` plus the\n`items[]` result rows.",
      +  "properties": {
      +    "items": {
      +      "description": "Result rows for the current page.",
      +      "items": {
      +        "$ref": "#/$defs/ScreenerResultItem"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "total": {
      +      "description": "Total number of matching securities.",
      +      "format": "int64",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "title": "ScreenerSearchResponse",
      +  "type": "object"
      +}
  7. Addedv0.4.5

TDQS

A4.2/5.0
Behavior4/5

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

With readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false already declared, the description does not need to restate safety. It contributes useful extra behavior: Mode A auto-fetches the strategy and runs it, and Mode A's market is overridden by the strategy's embedded market. It stops short of describing the result shape or error behavior, but the annotations lower the burden enough that this is only a minor gap.

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 only two sentences with no filler, and the core purpose is front-loaded before mode details. Every phrase ('Mode B required', 'Mode A uses strategy's market', 'auto-runs saved strategy') carries essential routing information.

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?

For a tool with this many parameters, the description leaves the heavy lifting to the schema, which is fully populated with per-field details such as sort defaults and technical indicator JSON formats. The top-level mode distinction plus the annotations make the tool callable; a fully 5-level description would only add a short note about what the response contains, since there is no output schema.

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%, and each parameter already has an explanatory description, so the baseline is 3. The top-level description mainly compresses mode behavior already present in the market, conditions, and strategy_id descriptions; it adds little new semantic value beyond labeling Market B as 'required.'

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 opens with a specific action and resource — 'Screen stocks' — and immediately narrows scope to markets US|HK|CN|SG. It also separates the two modes by naming the source of strategy_id (screener_recommend_strategies), which distinguishes it from the other screener_* siblings. Even though it never says 'returns matching stocks', the verb+resource is specific enough to communicate intent.

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 choosing between Mode A and Mode B: use a saved strategy in Mode A, or supply a market in Mode B ('Mode B required'). This is enough to route the agent to the right mode for the majority of calls. It does not, however, state exclusions or contrast with non-screener alternatives such as rank_list or candlesticks.

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