Skip to main content
Glama

analyze_portfolio

Read-only

Calculate a portfolio's value, sector/currency allocation, return, volatility, Sharpe ratio, and daily change from stock, index, ETF, or crypto positions.

Instructions

Bir portföyün değerini, sektör/para birimi dağılımını, getirisini, riskini (volatilite), Sharp oranını ve günlük değişimini analiz eder. Pozisyon listesine hisse/endeks/ETF/kripto girebilirsiniz.

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": {
      "positions": "<positions>"
    },
    "name": "analyze_portfolio"
  }
}

Input Schema

NameRequiredDescriptionDefault
positionsYesPortföydeki pozisyonlar
riskFreeRatePctNoRisksiz oran (% yıllık). Varsayılan %30 (Türkiye mevduat/politika faizi yaklaşımı)
includeBreakdownNoSektör/endüstri kırılımı, ağırlıklı beta ve yoğunlaşma uyarısı hesaplansın mı (sembol başına 1 ek istek)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.0
    • addedInput schema / properties / includeBreakdown
      Added value: +{
      +  "default": true,
      +  "description": "Sektör/endüstri kırılımı, ağırlıklı beta ve yoğunlaşma uyarısı hesaplansın mı (sembol başına 1 ek istek)",
      +  "type": "boolean"
      +}
  2. Addedv1.4.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile and external-data nature are covered structurally. The description adds which metrics are produced, which is useful context, but it omits operational behavior an agent would benefit from knowing, notably that includeBreakdown triggers one extra symbol request and can be slow, and how failures on unknown symbols surface.

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?

Two short sentences with the computed outputs front-loaded and the input flexibility second; nothing is padded or redundant within the text. It is compact enough for its scope, though it could be tightened by folding the asset-class note into the outcome sentence.

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

Completeness4/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 carries the burden of telling the agent what comes back, and it does so by naming the six analytic outputs. Combined with a 100%-documented three-parameter schema and read-only annotations, an agent has enough to call it correctly; only the per-symbol cost of includeBreakdown and error behavior are unaddressed.

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

Parameters3/5

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

Schema description coverage is 100%, so symbol formats (.IS suffix, BTC-USD), cost, riskFreeRatePct default of 30, and includeBreakdown are already fully documented in the schema. The description's asset-class sentence largely restates that, adding only the aggregate notion that stocks/indices/ETFs/crypto can be mixed in one list. Baseline 3 is appropriate.

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 gives a specific verb (analiz eder) and resource (bir portföyün) and enumerates what is computed: value, sector/currency allocation, return, volatility, Sharpe ratio, daily change. That makes the tool's job unmistakable. It stops short of naming a sibling such as backtest_portfolio, so the boundary against portfolio-simulation tools is left 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?

Usage is only implied: the second sentence clarifies that positions may contain stocks, indices, ETFs, or crypto, which tells an agent the tool accepts mixed-asset holdings. There is no explicit statement of when to use this instead of backtest_portfolio, nor any prerequisite, exclusions, or mention of what happens with an empty or single-position list.

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