Skip to main content
Glama
INo-xious

stockbit-mcp

by INo-xious

position_size

Read-only

Calculate how many lots to buy from your entry price, stop loss, and risk amount. See the position value, actual risk after flooring, round-trip commissions, break-even price, and 1R/2R/3R targets.

Instructions

How many lots to buy, given what you are willing to lose. Pure arithmetic — it reads no account, checks no buying power, and places nothing. Give entry_price, stop_price (which must be BELOW the entry — IDX retail has no short selling), and EITHER risk_idr OR account_idr with risk_pct. Not both: they can disagree. Lots are floored, never rounded up, so the risk is at most the number you gave. Returns the position value, what is actually at risk after flooring, the round-trip commission, the break-even price with commission included, and 1R/2R/3R targets on the tick grid. It CHECKS that entry and stop sit on the IDX price grid — an off-grid limit is rejected by the exchange rather than rounded — and, if you pass ara and arb from price_bands, that neither is outside today's auto-rejection band. Commission defaults to the published retail rate (0.15% / 0.25%) and feeSource says so; pass fee_buy_pct and fee_sell_pct, or read them from trading_info, for this account's. This is a plan, not a permission. Use order_preview for the real checks — buying power, tradability, and the caps in the trading policy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
araNoToday's ceiling, from price_bands.
arbNoToday's floor, from price_bands.
max_lotsNoNever suggest more lots than this.
risk_idrNoRupiah you are willing to lose. Or use account_idr + risk_pct.
risk_pctNoPercent of the account to risk, e.g. 1.
stop_priceYesWhere you would get out. Must be below entry_price.
account_idrNoAccount value, with risk_pct.
entry_priceYesLimit price you would buy at, in IDR.
fee_buy_pctNoBuy commission percent. Default 0.15.
fee_sell_pctNoSell commission percent. Default 0.25.
Behavior5/5

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

Even though annotations already declare readOnlyHint=true and destructiveHint=false, the description adds substantial behavioral context: it has no side effects, performs no account reads, floors lot sizes, checks the IDX price grid, rejects off-grid limits, and does not place orders. It also discloses commission defaults and the `feeSource` behavior. This far exceeds the baseline set by the annotations.

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?

The description is front-loaded with the core purpose and remains information-dense without redundancy. Each sentence contributes a distinct constraint, default, return value, or routing instruction. Given the 10-parameter complexity and absent output schema, the length is justified and well-organized.

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?

With no output schema, the description compensates by enumerating the return contents: position value, actual risk after flooring, round-trip commission, break-even price, and 1R/2R/3R targets. It also covers prerequisites, parameter relationships, grid-check behavior, fee defaults, and the boundary between planning and permission. Nothing essential 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%, so the baseline would be 3, but the description meaningfully enhances parameter understanding. It explains the mutual exclusivity of `risk_idr` versus `account_idr` + `risk_pct`, the requirement that `stop_price` be below `entry_price`, the flooring behavior of lot sizes, the source of `ara`/`arb` from `price_bands`, and the default/override semantics of fee parameters. This goes well beyond the raw schema descriptions.

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 opens with a specific, actionable statement: 'How many lots to buy, given what you are willing to lose.' It clearly identifies the tool as pure arithmetic that 'reads no account, checks no buying power, and places nothing,' and differentiates it from order execution by naming `order_preview` as the real-check alternative. This is a clear verb+resource pairing that distinguishes it from siblings.

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?

The description gives explicit when-to-use and when-not-to-use guidance: 'This is a plan, not a permission. Use `order_preview` for the real checks — buying power, tradability, and the caps in the trading policy.' It also explains the conditional parameter paths (`risk_idr` OR `account_idr` + `risk_pct`) and points to `price_bands` and `trading_info` for required inputs, leaving no ambiguity about how to select and invoke it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/INo-xious/stockbit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server