Skip to main content
Glama
Johnhyeon

StockLens

by Johnhyeon

get_flow_batch

Read-onlyIdempotent

Batch-fetch institutional and foreign net buying for up to 30 stocks. Use summary mode for 5/20/60-day accumulated net buying to compare supply-demand trends.

Instructions

수급벌크 — 여러 종목의 투자자 수급(기관·외국인 순매매)을 한 번에 병렬 조회.

개별 get_flow를 N번 부르는 것보다 훨씬 빠릅니다 (서버 내부 asyncio.gather). "이 종목들 외국인 매수 같이 들어왔나", "관심종목 수급 비교" 같은 질문에 사용.

summary=True 는 심층 모드입니다: 일별 원문 대신 종목당 5/20/60일 누적 순매매와 순매수(양수) 일수로 압축해, 상한이 60일로 늘어납니다. "15종목 최근 60일 수급 판정" 같은 질문을 단건 호출 없이 한 번에 봅니다.

Args: codes: 종목코드 리스트 (최대 30개) days: 종목당 조회 일수 (기본 5, 일별 모드 최대 20 / summary 모드 최대 60) summary: True 면 일별 행 대신 5/20/60일 누적·순매수 일수 요약 (기본 False)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo
codesYes
summaryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.1.3
    • removedInput schema / properties / days / default
      Removed value: -5
    • removedInput schema / properties / summary / default
      Removed value: -false
  2. Changed1 schema field changedv1.0.1
    • addedInput schema / properties / summary
      Added value: +{
      +  "default": false,
      +  "title": "Summary",
      +  "type": "boolean"
      +}
  3. Addedv0.5.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the read-only/idempotent annotations, the description adds meaningful behavior: server-side asyncio.gather parallelism, batch size cap of 30 codes, day limits per mode, and the summary=True deep-mode behavior with 5/20/60-day cumulative metrics. It also describes what changes between daily rows and summary mode, which is far more than the annotations convey.

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-structured and front-loaded: purpose, performance benefit, usage context, then parameter details. Each sentence adds information, including the summary-mode walkthrough and max limits. There is no filler or redundant repetition of schema fields.

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?

Given the presence of an output schema and read-only annotations, the description is complete for practical invocation. It covers when to use the tool, how parameters behave in each mode, the batch limit, and the relationship to get_flow. Nothing essential for correct selection or invocation is missing.

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 description coverage is 0%, so the description carries full responsibility for parameters. It fully documents codes (list, max 30), days (default 5, max depends on mode: 20 daily / 60 summary), and summary (toggle between daily rows and cumulative summary). Every parameter is semantically explained.

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 action and resource: parallel bulk lookup of investor supply/demand (institutional/foreign net buying) for multiple stocks. It also distinguishes itself from the sibling get_flow by emphasizing batch parallelism and naming get_flow as the single-stock alternative.

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 concrete use cases ('did foreigners buy these stocks together', 'compare supply/demand of watchlist stocks') and explicitly contrasts with calling get_flow N times. It lacks an explicit 'when not to use' statement, but the context is clear enough that an agent can route correctly.

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