Skip to main content
Glama
Trading 212 MCP

Trading 212 MCP

by moeinxyz

calculate_stock_metrics

Read-onlyIdempotent

Computes a local stock scorecard from supplied filing inputs for current and prior periods, with optional P/E from explicit trailing EPS and a dated close.

Instructions

Calculate a local scorecard from supplied filing inputs. Currency and scale apply to both periods. EPS and price always use major currency units per share. An optional P/E requires explicitly supplied trailing-year diluted EPS and a dated close. Returns decimal strings and nulls for unavailable measures.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "current": "<current>",
      "currency": "<currency>",
      "amount_scale": "<amount_scale>"
    },
    "name": "calculate_stock_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
priorNo
currentYes
currencyYesThree-letter reporting currency. Use major units for all per-share figures.
valuationNo
amount_scaleYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already establish it as a read-only, idempotent, closed-world operation, so the bar is lower. The description adds value beyond them by noting computation is local, that currency and scale apply to both periods, that per-share figures ignore amount scaling, and that unavailable measures come back as nulls with decimal strings. It still does not describe the shape of the scorecard or any validation/error behavior.

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?

Four short sentences, front-loaded with the purpose, then constraints, then return format. No filler or repetition; density is close to the ceiling for the amount of information conveyed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value detail is not required, and the annotations cover safety. However, for a 5-parameter tool with deeply nested FinancialPeriod objects at 20% schema coverage, the description leaves the two-period comparison model and scale handling under-explained, which is the main gap.

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

Parameters2/5

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

With schema description coverage at 20%, the description must carry parameter meaning and largely does not. It clarifies scale/currency semantics and the valuation prerequisite for P/E, but never explains prior vs current, the period_kind enum, or how amount_scale interacts with the nonnegative magnitude fields like capex_outflow.

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?

States a specific verb and result: 'Calculate a local scorecard from supplied filing inputs.' It is clearly a computation over caller-supplied data rather than a lookup, which separates it from siblings like get_portfolio_overview or search_instruments. 'Scorecard' remains somewhat abstract about which metrics are produced.

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

Usage Guidelines3/5

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

The P/E sentence gives a real conditional (requires explicitly supplied trailing-year diluted EPS and a dated close), but there is no statement of when to choose this tool over the portfolio/trading siblings or what inputs make it inappropriate. Usage is implied rather than addressed.

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