Skip to main content
Glama

株主優待 MCP (Yutai MCP)

calc_dates

権利日を入力すると、クロス取引に必要な各種日付・日数を計算して返す。

【入力 vestingDate】 ・"2026-09-30" のような具体的な日付(その年で固定) ・"9月末" / "09" / "9"(月のみ)→ その月末で、次に到来する回 ・"9月20日" / "09-20" / "9/20" / "0920" → その日で、次に到来する回

【tradeDate】省略時は「今注文したとき」の約定日(JST 15:30より前なら当日、以降なら翌営業日、 土日祝はさらに繰り上げ)。「今から」系の日数(interestDays 等)はこの日を起点にする。

【返す主なフィールド】 ・vestingDate: 権利確定日(基準日) ・lastDayWithRights: 権利付最終日 ・exRightsDate: 権利落ち日 ・interestDays: 今建てた場合の信用金利/貸株料の対象日数(決済が間に合わなければ -1) ・negativeInterestDays: 逆日歩の対象日数(権利付最終日が金曜だと土日を挟んで増える) ・managementFeeMonths: 信用売り建玉の事務管理費がかかる月数 ・crossable: 今から建てて権利落ち日までに決済が間に合うか ・shortSellingLiberation: 一般信用「短期」つなぎ売りの解禁スケジュール。

  • sbiGmo: SBI・GMOは同一ルール(営業日ベース、「権利落ち日を含めて15営業日前」)。 liberationDate=売建可能日、orderAcceptedFrom=その前営業日(19:00頃から新規売り注文を受付、翌営業日に先着約定)。

  • rakuten: 実効権利確定日の13暦日前を求め、休場日なら翌営業日に調整して最早売建日を計算。orderAcceptedFrom=その前営業日(19時頃から受付)。実際の取扱・在庫・個別期日は別途確認。

  • auカブコム・SMBC日興は短期一般信用の取扱いが無いため対象外(詳細は note 参照)。 ・prevYear: 前年の同一権利の基準日(get_benefit の negativeInterests / remainingHistories の prev データと突き合わせるのに使う) ・businessDaysUntilLastDayWithRights / calendarDaysUntilLastDayWithRights: 権利付最終日までの残り

日付は "YYYY-MM-DD" 形式の文字列で返す。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tradeDateNo約定日 (YYYY-MM-DD)。省略時は「今」から自動算出
vestingDateYes権利日。例: "9月末" / "9月20日" / "2026-09-30"

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes入力された権利日指定(正規化前の生テキスト)
prevYearYes前年の同一権利。get_benefit の negativeInterests/remainingHistories の prev データの基準日と突き合わせるのに使う
crossableYesinterestDays !== -1。今から建てて権利落ち日までに決済が間に合うか
tradeDateYes起点にした約定日
vestingDateYes権利確定日(基準日)
exRightsDateYes権利落ち日。クロスの決済(現渡し等)を入れる日
interestDaysYes今建てた場合の信用金利/貸株料の対象日数。決済が間に合わなければ-1
deliveredDateYestradeDateの現物/信用建て分の受渡日
canWeekendOrderYes今(tradeDate起点)から土日をまたぐ注文ができるか
lastDayWithRightsYes権利付最終日。この日までに現物を約定していれば権利が取れる
managementFeeMonthsYes信用売り建玉の事務管理費がかかる月数(今から権利まで)
negativeInterestDaysYes逆日歩(品貸料)の対象日数。権利付最終日が金曜だと土日を挟んで増える
shortSellingLiberationYes一般信用「短期」つなぎ売りの解禁スケジュール
businessDaysUntilLastDayWithRightsYestradeDateから権利付最終日までの営業日数(tradeDate自身は除く)
calendarDaysUntilLastDayWithRightsYestradeDateから権利付最終日までの暦日数

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/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 burden and does so well: it discloses sentinel behavior (interestDays = -1 when settlement cannot make it), that negativeInterestDays grows around weekends, broker-specific liberation rules (SBI/GMO vs Rakuten vs au Kabucom/SMBC Nikko being out of scope), and the YYYY-MM-DD return format. It stops short of auth/permission notes, but for a pure date calculator that is a minor omission.

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 definition is long but strongly front-loaded with the one-line purpose, then organized under bracketed headings for inputs, tradeDate default, and returned fields. Every sentence carries information; the length is justified by the input-format ambiguity, though some field explanations could be trimmed.

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?

Given an output schema exists, the return-value explanations are strictly redundant, yet the description still supplies the domain complexity an agent needs: input normalization rules, the tradeDate default, and broker-conditional liberation schedules. It is essentially complete for correct invocation, only mildly over-explaining outputs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it enumerates accepted vestingDate formats ("2026-09-30", "9月末", "09", "9", "9月20日", "0920") and explains that month-only inputs resolve to the next upcoming cycle, plus the exact default rule for the omitted tradeDate.

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 opening sentence gives a specific verb+resource: takes a vesting date and returns the dates/days needed for a cross trade (クロス取引). Scope is clear and it implicitly separates itself from siblings by naming estimate_cross_fee's domain (fees) and explaining how the prevYear field pairs with get_benefit, though it never explicitly contrasts the siblings' purposes.

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?

It gives concrete when-to-use conditions: tradeDate defaults to 'now' (before/after 15:30 JST, weekends/holidays rolling forward), and prevYear is meant to be matched against get_benefit's negativeInterests / remainingHistories prev data. It does not state when NOT to reach for this tool versus estimate_cross_fee, so it falls short of the explicit-exclusion bar.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources