Skip to main content
Glama

VistaShares ETFs

ETF cost calculator

etf_cost
Read-onlyIdempotent

Estimates the dollar cost of holding an ETF: expense ratio over a holding period plus the bid-ask spread paid when buying and later selling. Same math as https://www.vistashares.com/etf-cost-calculator/.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "etf_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearsNoHolding period, in years. Accepts 1 to 50; default 5.
amountNoAmount invested, in dollars. Accepts 0 to 1000000000; default 100000.
spread_pctNoRound-trip bid-ask spread, in percent. Accepts 0 to 5; default 0.1.
expense_ratio_pctNoExpense ratio, in percent per year. Accepts 0 to 5; default 0.5.

Output Schema

NameRequiredDescriptionDefault
noteYes
pageYes
inputsYes
total_costYes
explanationYes
spread_costYes
expense_ratio_costYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / amount / description
      Previous value: -"Amount invested, in dollars."New value: +"Amount invested, in dollars. Accepts 0 to 1000000000; default 100000."
    • changedInput schema / properties / expense_ratio_pct / description
      Previous value: -"Expense ratio, in percent per year."New value: +"Expense ratio, in percent per year. Accepts 0 to 5; default 0.5."
    • changedInput schema / properties / spread_pct / description
      Previous value: -"Round-trip bid-ask spread, in percent."New value: +"Round-trip bid-ask spread, in percent. Accepts 0 to 5; default 0.1."
    • changedInput schema / properties / years / description
      Previous value: -"Holding period, in years."New value: +"Holding period, in years. Accepts 1 to 50; default 5."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "expense_ratio_cost": {
      +      "type": "string"
      +    },
      +    "explanation": {
      +      "type": "string"
      +    },
      +    "inputs": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "amount": {
      +          "type": "number"
      +        },
      +        "expense_ratio_pct": {
      +          "type": "number"
      +        },
      +        "spread_pct": {
      +          "type": "number"
      +        },
      +        "years": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "amount",
      +        "expense_ratio_pct",
      +        "years",
      +        "spread_pct"
      +      ],
      +      "type": "object"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "page": {
      +      "format": "uri",
      +      "type": "string"
      +    },
      +    "spread_cost": {
      +      "type": "string"
      +    },
      +    "total_cost": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "inputs",
      +    "expense_ratio_cost",
      +    "spread_cost",
      +    "total_cost",
      +    "explanation",
      +    "page",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive calculation with no external side effects. The description adds value by clarifying that the estimate covers expense ratios and round-trip spread costs, but it does not disclose anything further about output granularity or assumptions beyond what the schema and output schema provide.

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 two tightly written sentences with the core calculation front-loaded. Every phrase contributes to understanding what is estimated and how.

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 simple calculator with four fully documented optional parameters, rich annotations, and an output schema, the description supplies sufficient context. It explains the estimate's components and points to a reference implementation, leaving no essential invocation detail unclear.

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 all four parameters already have clear semantics, defaults, and constraints. The description reinforces the concepts of holding period, expense ratio, and bid-ask spread, but adds no parameter-level meaning 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?

The description states a specific verb, 'Estimates,' and a precise resource, 'dollar cost of holding an ETF.' It further defines the calculation as expense ratio over the holding period plus the bid-ask spread paid when buying and later selling, which clearly separates it from the fund-data retrieval siblings.

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 makes the tool's intended use clear by explaining the cost components it models, but it does not explicitly say when to use this calculator versus related fund-analysis tools. The reference to the VistaShares calculator is useful context but not usage guidance.

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.

Resources