Skip to main content
Glama
Satsuj1n

xp-mcp

by Satsuj1n

calculate_mwr

Compute money-weighted return (IRR) for XP Investimentos portfolios, accounting for cash flow timing. Returns annualized MWR, cash flow breakdown, and diagnostics from XPerformance.

Instructions

Money-weighted return (MWR / IRR) — the rate that reflects when you put money in vs. out. Computed via bisection over signed cash flows including synthetic initial/terminal NAV. Requires ≥ 2 XPerformance imports. Returns mwr_period, mwr_annualized, cash_flow_breakdown, convergence diagnostics, and warnings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
period_toNo
period_fromNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It explains the computation method (bisection over signed cash flows), mentions synthetic initial/terminal NAV, and lists outputs including convergence diagnostics and warnings. This gives a good sense of behavior, though it does not explicitly state whether the operation is read-only or has no side effects.

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 compact and front-loaded with the tool's identity and purpose. It packs computation method, prerequisites, and outputs into a short paragraph without unnecessary filler or repetition.

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?

The description covers what the tool calculates, how it computes, prerequisites, and return values. It is missing parameter format/usage details and does not provide explicit selection criteria versus calculate_twr or other sibling tools. This is adequate for basic understanding but not fully complete for confident invocation.

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

Parameters1/5

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

The input schema has two string parameters, period_to and period_from, with zero description coverage in the schema. The description does not explain the expected date format, whether the range is inclusive, or whether the parameters are optional/required. Since there is no schema description and no parameter explanation in the text, an agent cannot reliably construct valid inputs.

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 description clearly defines the tool as computing money-weighted return (MWR/IRR) and explains its core purpose: reflecting the timing of cash flows. It also names the expected return fields, which makes the purpose concrete. However, it does not explicitly contrast with calculate_twr, so differentiation from that sibling is only implicit.

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 description gives a prerequisite ('Requires ≥ 2 XPerformance imports') and states the computation approach, which implies when the tool can be used. It does not explicitly say when to prefer this over calculate_twr or other portfolio analysis tools, so the guidance is not fully explicit.

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