Skip to main content
Glama

Risk metrics and portfolio health score (Pro)

get_risk
Read-onlyIdempotent

Assess portfolio risk, in one of two views; both need a Pro plan, and a free account gets an upgrade_required answer, not an error. metrics: measured risk over period (omit for full history): max drawdown in % and USD with peak and trough days, annualized volatility and return, Sharpe, and return, beta and correlation against benchmark (BTC by default, or ETH). Drawdown is flow-honest, so a withdrawal is not counted as a loss, and a metric is null when the window holds too few daily returns. score: a 0-100 structural health rating with a band (resilient, solid, fragile, concentrated), pillar sub-scores (diversification, custody, liquidity, quality, volatility, hygiene, target drift) and what moved since the last reading; it scores structure, never returns, over a fixed 30 days, so it takes no period or benchmark and refuses them. A pillar that cannot be measured yet is listed in excluded, not scored zero. Use metrics for "what was my worst drawdown", "do I just track bitcoin"; score for "how healthy is my portfolio". For profit use get_performance.

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": {
      "view": "<view>"
    },
    "name": "get_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
viewYesWhich view to read: metrics (drawdown, volatility, Sharpe, beta over period); score (0-100 health score, fixed 30 days). Each view takes only the arguments the description lists for it.
periodNoTime window ending now: last_24h, last_7d, last_30d, last_90d, ytd (since 1 January UTC) or all. Omit for all time.
profileNoWhich portfolio to read, for accounts with more than one: its id, or its name (exact, case-insensitive, e.g. "Trading"). Omit to read this connection's default portfolio; every answer names the portfolio it read in `profile`. An unknown or shared name returns profile_not_found or profile_ambiguous listing the real ones, and list_profiles shows them up front.
benchmarkNometrics only. Asset to measure beta, correlation and excess return against. Defaults to BTC.

Output Schema

NameRequiredDescriptionDefault
viewNoWhich view answered; its data is under the key of the same name.
errorNoPresent ONLY when the call was refused instead of answered: upgrade_required (Pro plan needed), not_found, profile_not_found, profile_ambiguous, invalid_arguments, write_not_permitted, rate_limited, limit_reached, view_unavailable. No data fields come with it; read `message` to the user rather than retrying the same call.
scoreNoPresent when view = "score".
messageNoPlain-language explanation that accompanies `error`, `data_status` or a proposed change. Read it to the user.
metricsNoPresent when view = "metrics".
profileNoThe portfolio these figures belong to (absent on list_profiles).
next_stepNoWhat the user should do about data_status.
source_urlNoLink to the page in the WhereItGoes app that shows this data.
data_statusNoPresent only when the portfolio has no data yet. nothing_connected: no exchange and no wallet is connected, so empty lists and zeros mean "no data", NOT a $0 portfolio, and no data fields come with it (except on get_connections, get_alerts, get_target_allocation and list_profiles, which also answer). Send the user to next_step. syncing: a source is connected but its first sync is still running, so figures are partial and not final.
upgrade_urlNoWhere the user can upgrade, on an upgrade_required refusal.
stock_assetsNoPresent when the answer mentions Binance Stocks shares (EQ_<ticker>): they are US stocks, not crypto.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / error / description
      Previous value: -"Present ONLY when the call was refused instead of answered: upgrade_required (Pro plan needed), not_found, profile_not_found, profile_ambiguous, invalid_arguments, write_not_permitted. No data fields come with it; read `message` to the user rather than retrying the same call."New value: +"Present ONLY when the call was refused instead of answered: upgrade_required (Pro plan needed), not_found, profile_not_found, profile_ambiguous, invalid_arguments, write_not_permitted, rate_limited, limit_reached, view_unavailable. No data fields come with it; read `message` to the user rather than retrying the same call."
  2. Changed3 schema fields changed
    • addedOutput schema / properties / data_status
      Added value: +{
      +  "description": "Present only when the portfolio has no data yet. nothing_connected: no exchange and no wallet is connected, so empty lists and zeros mean \"no data\", NOT a $0 portfolio, and no data fields come with it (except on get_connections, get_alerts, get_target_allocation and list_profiles, which also answer). Send the user to next_step. syncing: a source is connected but its first sync is still running, so figures are partial and not final.",
      +  "enum": [
      +    "nothing_connected",
      +    "syncing"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / message / description
      Previous value: -"Plain-language explanation that accompanies `error` or a proposed change."New value: +"Plain-language explanation that accompanies `error`, `data_status` or a proposed change. Read it to the user."
    • addedOutput schema / properties / next_step
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "What the user should do about data_status.",
      +  "properties": {
      +    "action": {
      +      "enum": [
      +        "connect_a_source",
      +        "wait_for_first_sync"
      +      ],
      +      "type": "string"
      +    },
      +    "add_exchange_url": {
      +      "description": "App page to connect an exchange with a read-only API key.",
      +      "type": "string"
      +    },
      +    "add_wallet_url": {
      +      "description": "App page to add a wallet address to watch.",
      +      "type": "string"
      +    },
      +    "settings_url": {
      +      "type": "string"
      +    },
      +    "sync_status_url": {
      +      "description": "App page showing sync progress.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "action"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations it discloses real behavior: a Pro plan is required and a free account gets an upgrade_required answer rather than an error, drawdown is flow-honest so withdrawals are not losses, metrics are null when the window has too few daily returns, and the score is fixed at 30 days and refuses period/benchmark. It stops short of covering pagination or rate limits, but for a read-only analytical tool this is well above the bar the annotations set.

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?

Dense but front-loaded, with the plan requirement and the two views stated before the detail, and the "metrics:" / "score:" labels making the split scannable. A few clauses, such as the repeated benchmark defaults and the drawdown explanation, could be tightened without losing meaning.

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?

For a four-parameter tool with an output schema, this covers everything an agent needs to call it correctly: entitlement behavior, view-dependent argument validity, defaults, null semantics, excluded pillars, and the profile_not_found/profile_ambiguous failure modes. Return values are not over-explained, which is right given the output schema exists.

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 already 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema cannot express: period applies only to metrics and omitted means full history, benchmark defaults to BTC and is metrics-only, and score refuses both. It also explains that profile defaults to the connection's portfolio and that every answer echoes the profile read.

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?

Opens with a specific verb and resource ("Assess portfolio risk") and immediately splits it into the two named views, metrics and score, each defined by what it measures. It explicitly routes profit questions to get_performance, so an agent can separate this tool from its nearest sibling without reading either schema.

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?

Gives explicit selection criteria between the two views and backs them with user-intent examples ("what was my worst drawdown" vs "how healthy is my portfolio"). It also names the alternative for a different intent (get_performance for profit) and points to list_profiles for profile discovery.

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.