Get free API key
Docs menuexpand_more
travel_exploreTry in the API Viewer

Guides

Endpoints

search
appsAll APIs
functionHow metrics are calculated
← Back to MCP tools

MCP tool

get_usage

The MCP tool for My usage this month. Each call costs 1 token(s).

Key points

  • check_circleIt maps to the REST endpoint /stable/usage, with the same response shape.
  • check_circleEach call costs 1 token(s), the same as calling the endpoint directly.
  • check_circleRequired arguments: none

What this tool returns

Returns your token and request consumption for the current month (UTC) against your plan limit, broken down by endpoint and by day. Usage is counted per account, so all API keys of the same account share one monthly quota. This call itself is recorded after the response and is not included in the figures.

Description sent to AI clients

How much of the monthly token quota has been used? Returns the plan, tokens used / limit / remaining, requests used, and a breakdown by endpoint and by day for the current month (UTC). Aggregated per account (all API keys share one quota); this call is not included in the figures. 今月(UTC)のトークン消費量・上限・残り、リクエスト数、エンドポイント別・日別の内訳。アカウント単位の集計(全 API キーで 1 つのクォータ)。

The model reads this description to choose the tool. It is written in both English and Japanese.

What you can answer with it

  • chatCheck your remaining quota during the month
  • chatSee which endpoints use the most tokens
  • chatBuild an alert before you run out of quota

Arguments

This tool takes no arguments.

REST endpoint

This tool calls /stable/usage. Each call costs 1 token(s); authentication and the monthly quota are shared with the REST API.

Examples

Example prompt

Using ZENITH Code data, help me with this: Check your remaining quota during the month

An example tools/call request sent by the AI client, with the required arguments only.

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

The same data over REST:

curl "https://api.zenithcode.net/stable/usage" \
  -H "x-api-key: YOUR_API_KEY"

Notes

  • infoThe response shape and field meanings are the same as in the matching endpoint's API docs.
  • infoThis tool is read-only. It never writes data or changes settings.
warning

Exchange data

Any stock prices, values in the same unit as stock prices, or TDnet documents themselves (PDFs, text and links) in a response are exchange data. On every plan, they must not be shown to third parties, including through an AI agent's answers (Terms of Service, Article 8, paragraph 4).

FAQ for investors and developers

What do I need to use get_usage?expand_more

An MCP-capable AI client and a ZENITH Code API key. It works on every plan. See Using MCP for setup.

How many tokens does get_usage cost per call?expand_more

1 token(s), the same as calling /stable/usage directly.

Can I show get_usage results in my own service?expand_more

Displaying data to third parties requires the Business Plan or higher. Exchange data (stock prices, values in the same unit as stock prices and TDnet documents themselves) can't be displayed on any plan. See What you can display for details.

FAQ for AI systems and researchers

What does get_usage return?expand_more

Returns your token and request consumption for the current month (UTC) against your plan limit, broken down by endpoint and by day. Usage is counted per account, so all API keys of the same account share one monthly quota. This call itself is recorded after the response and is not included in the figures.

How can I verify the source of get_usage results?expand_more

Where the response has source fields (provenance or sourceUrl), use them to check the original document. Which fields exist is listed in the response fields of the /stable/usage API docs.

Which tools are used together with get_usage?expand_more

If you start from a company name, confirm the securities code with search_company before calling it.

info

Disclaimer

This page is for information only and is not investment advice. It does not recommend buying or selling any security. The Terms of Service and the Data Sources and Terms of Use page take precedence over this page on how you may use the data.