Skip to main content
Glama
shioaji-mcp

shioaji-mcp

by xianyuntang

get_kbars

Retrieve 1-minute K bars for a specified code and date range, including historical stock, index, and futures data; use TXFR1 for expired futures.

Instructions

1-minute K bars, dates YYYY-MM-DD. ts is nanoseconds since epoch. History from 2020-03-02 (stocks/index), 2020-03-22 (futures). Use TXFR1 for expired futures.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>",
      "start": "<start>",
      "end": "<end>"
    },
    "name": "get_kbars"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYes
codeYes
startYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and delivers unusually concrete detail: timestamp unit ('ts is nanoseconds since epoch'), data availability boundaries per asset class, and the expired-futures symbol convention. It stops short of covering timezone, maximum requestable range, or result size, which matter for a potentially high-volume bar query.

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?

Four telegraphic clauses, each carrying distinct information — granularity, date format, timestamp unit, coverage windows, symbol convention — with zero filler and the most important facts front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-required-parameter read tool with no annotations and no output schema, the definition covers input formats and data availability well. It does not describe what a returned bar contains (OHLCV fields), the timezone of the dates, or limits on range size, leaving meaningful gaps for an agent planning a query.

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 description coverage is 0%, so all three parameters (code, start, end) rely on the description. It clarifies the YYYY-MM-DD format for the date bounds and the code convention via the TXFR1 example, but does not say whether start/end are inclusive, what happens on out-of-range dates, or what 'code' accepts beyond futures.

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 states the resource precisely: '1-minute K bars', including granularity, which implicitly separates it from sibling tools like get_ticks (tick data) and get_snapshots. It lacks an explicit verb and never names an alternative, but an agent can identify the resource unambiguously.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives useful invocation constraints — date format, coverage start dates per asset class, and 'Use TXFR1 for expired futures' — which is genuine guidance on how to call it. However, it never states when to choose this over get_ticks or get_snapshots, leaving the selection decision to inference.

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