Skip to main content
Glama
meteoroh

tossinvest-mcp

by meteoroh

Get investor-type trading flows

tossinvest_get_investor_trading
Read-onlyIdempotent

Get KRX buy/sell values by investor type for KOSPI or KOSDAQ, newest period first, to see if foreigners are net buying or selling.

Instructions

Get KRX buy/sell value broken down by investor type for KOSPI or KOSDAQ, newest period first.

This answers "are foreigners buying or selling?" — the classic Korean-market flow question. Net flow = buyAmount - sellAmount.

Args:

  • symbol ('KOSPI' | 'KOSDAQ'): only these two are supported here.

  • interval ('1d' | '1w' | '1mo' | '1y'): the period each record aggregates.

  • count (number): 1-100, default 10.

  • until (string, optional): YYYY-MM-DD inclusive upper bound. Pass the previous response's nextUntil to page backwards.

  • response_format ('markdown' | 'json'): default 'markdown'.

Returns { symbol, interval, count, records: [{ date, updatedAt, individual, foreigner, institution, otherCorporation }], nextUntil }. Each investor entry is { buyAmount, sellAmount }; institution additionally carries a 'breakdown' with seven sub-categories (financialInvestment, insurance, trust, privateEquityFund, bank, otherFinancialInstitution, pensionFund) that sum to the institution totals.

All amounts are KRW integers as strings — there is no currency field. 'foreigner' is the total across registered and unregistered foreign investors. Buy totals across the four categories equal sell totals market-wide. The current day's record is provisional until the close; check updatedAt.

Errors: 400 unsupported-symbol for anything other than KOSPI/KOSDAQ.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of records to return (max 100).
untilNoInclusive upper bound (YYYY-MM-DD). Use the previous response's nextUntil to page backwards.
symbolYesOnly KOSPI and KOSDAQ have investor flow data.
intervalYesAggregation period per record: daily, weekly, monthly or yearly.
response_formatNoOutput format: 'markdown' for a compact human-readable summary, 'json' for the complete raw payload.markdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
symbolYes
recordsYesAll amounts are KRW integers, newest first
intervalYes
nextUntilNoPass as `until` for the next (older) page
truncatedNo
truncation_messageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already indicate readOnly, idempotent, openWorld, and non-destructive behavior. The description goes further by explaining amount representation as KRW strings, foreigner aggregation across registered/unregistered, market-wide buy/sell equality, provisional current-day data, checking updatedAt, and the 400 unsupported-symbol error.

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?

Although the description is dense, every sentence adds distinct value: purpose, output structure, amount semantics, investor aggregation, provisional data caveat, and error behavior. No filler or redundant phrasing is present.

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?

The description fully covers the tool's purpose, parameters, output structure, data semantics, provisional-data caveat, and error handling. Given the output schema and annotation context, nothing needed for correct 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 coverage is 100%, but the description adds meaningful semantics beyond the schema: net flow = buyAmount - sellAmount, institution subcategories sum to institution totals, and the meaning of 'foreigner' across registered and unregistered investors. It also clarifies the response_format distinction between markdown summary and raw JSON payload.

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 clearly states the tool gets KRX buy/sell value broken down by investor type for KOSPI/KOSDAQ, newest first. This specific verb and resource distinguish it from sibling tools such as get_trades, get_candles, and get_rankings.

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 explicitly frames the use case: 'answers are foreigners buying or selling?' and the classic Korean-market flow question. It does not explicitly name alternative tools to avoid, but the clear purpose provides strong contextual guidance for when to select this tool.

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