Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Forex Margin Level

workflow.run_forex_margin_level
Read-only

Free margin and margin level % from account equity and used margin: equity/usedMargin*100, the same stop-out proximity metric every forex platform shows. Returns null (not Infinity) when usedMargin is 0, meaning no open position. Use when user asks "how close am I to a margin call?" or "what's my free margin?". Returns: freeMargin, marginLevelPct.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
equityYesAccount equity (balance + floating P&L)
usedMarginYesMargin currently locked by open positions. 0 if none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare this a safe, read-only, non-open-world calculation, so the bar is low. The description still adds real value by disclosing the usedMargin=0 edge case and the deliberate null-instead-of-Infinity return, which an agent cannot infer from annotations or schema alone.

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?

Front-loaded with the formula, then usage triggers, then return values, then the edge case – a sensible ordering. It is slightly dense with three separate concerns, but every clause carries information and nothing is redundant.

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 listing the returned fields (freeMargin, marginLevelPct). Combined with the formula, edge-case note, and usage triggers, an agent has everything needed to call and interpret this tool.

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 100%, so both parameters are already documented, giving a baseline of 3. The description adds the relationship between them (equity divided by usedMargin times 100) and clarifies that usedMargin being 0 means no open position, which enriches semantics beyond the schema.

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?

States the exact computation (equity/usedMargin*100) and names the resulting metrics (freeMargin, marginLevelPct), so the agent knows precisely what is produced. It also implicitly separates itself from the sibling run_forex_margin_required by framing itself as the stop-out proximity metric rather than a margin requirement calculation.

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?

Gives concrete trigger phrasings ("how close am I to a margin call?", "what's my free margin?") that map directly to invocation. It does not explicitly name alternatives such as run_forex_margin_required for exclusion, but the usage context is unambiguous.

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.