Skip to main content
Glama
bitbank-lab-mcp

bitbank-lab-mcp

Official
by bitbankinc

prepare_depth_data

Retrieve order book depth data for a trading pair and return cumulative bid/ask volume arrays, spread, and band metrics for visualization.

Instructions

[Depth Chart / Order Book / Visualization] 板の深度チャート描画の第一選択ツール。

getDepth(/depth API)を呼び出し、累積 volume の階段配列 ([price, cumulativeVolume][]) として返す。 Claude.ai の Visualizer 等クライアント側で描画可能な場合はこのツールを優先。 ファイル保存(SVG/PNG)が必要な場合は render_depth_svg を使用。

レスポンス形式: { bids: [[price, cumVolume], ...], asks: [[price, cumVolume], ...], bestBid, bestAsk, mid, spread, spreadPct, totalBidVolume, totalAskVolume, band: {pct, bidVolume, askVolume, ratio}, timestamp, isoTime }

  • bids は価格降順、asks は価格昇順

  • band は mid を中心とした ±bandPct 範囲の買い/売り量と比率(ratio = bidVolume / askVolume)

  • bids / asks / bestBid / bestAsk は取引所の価格のまま。mid と spread は丸め済み(10 万円以上は円の整数、安いペアほど小数の桁が増える)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "prepare_depth_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairNobtc_jpy
levelsNo取得する最大レベル数(片側)。10〜1000 の整数、デフォルト 200
bandPctNomid を中心とした ±range 比率。0.01 = ±1%。デフォルト 0.01

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the burden, and it does meaningful work: it discloses the upstream source (/depth API), the sort order of bids (descending) and asks (ascending), the band computation with ratio = bidVolume/askVolume, and the asymmetric rounding rule for mid/spread. It does not mention permissions, rate limits, or error behavior, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The bracket tag and the routing sentence are front-loaded and the response-format block is well organized as a field list with bullet clarifications. The response block is long, but given there is no output schema it earns its space; minor redundancy between the format line and the bullets.

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?

With no output schema, the detailed return-shape documentation (field names, ordering, band semantics, rounding) is exactly what an agent needs to consume the result. What is missing is guidance on the unlabeled pair parameter and on edge cases when the requested levels exceed available book depth.

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 67%, with levels and bandPct already documented in the schema. The description reinforces bandPct by explaining that band is the ±bandPct range around mid, but it never explains the pair parameter's expected format or accepted values, leaving the one undocumented parameter unaddressed.

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 (calls the /depth API via getDepth) and a specific return shape (cumulative volume step arrays [[price, cumVolume], ...]), and labels itself as the first-choice tool for depth-chart drawing. It also names the sibling render_depth_svg and the boundary between them, so an agent can distinguish it without opening the schema.

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

Usage Guidelines5/5

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

It gives an explicit selection rule: prefer this tool when the client (e.g. Claude.ai Visualizer) can render client-side, and use render_depth_svg when an SVG/PNG file must be saved. That is a concrete when-to-use plus a named alternative with the condition that selects it.

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