Skip to main content
Glama
matthewdtowles

iwantmymtg-mcp

refresh_portfolio

Recalculate your portfolio P&L after recording transactions to get updated profit and loss numbers.

Instructions

Recalculate the user's portfolio P&L. Use after recording a batch of transactions if you want immediate fresh numbers. Requires IWMM_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the refresh_portfolio tool. It makes an authenticated POST request to /api/v1/portfolio/refresh.
    export const refreshPortfolioTool = {
      name: "refresh_portfolio",
      description:
        "Recalculate the user's portfolio P&L. Use after recording a batch of transactions if you want immediate fresh numbers. Requires IWMM_API_KEY.",
      inputSchema: z.object({}),
      handler: () => apiFetch({ path: "/api/v1/portfolio/refresh", method: "POST", authenticated: true }),
    };
  • Input schema for refresh_portfolio - an empty object (no parameters required).
    inputSchema: z.object({}),
  • Registration of refreshPortfolioTool in the tools array, which is later exported as toolsByName for the MCP server.
    refreshPortfolioTool,
  • Import of refreshPortfolioTool from ./portfolio.ts into the central tools index.
    refreshPortfolioTool,
Behavior3/5

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

Specifies auth requirement 'Requires IWMM_API_KEY', but lacks details on side effects, rate limits, or idempotency. With no annotations, more behavioral context would be beneficial.

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?

Two sentences, front-loaded with purpose, no wasted words. Highly concise and to the point.

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?

Adequate for a simple 0-param tool: covers purpose, usage context, and auth. Could mention result behavior, but sufficient.

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?

No parameters in schema; description correctly adds no parameter info. Baseline 4 for 0-param tools is appropriate.

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 clearly states the verb 'Recalculate' and the resource 'portfolio P&L', distinguishing it from other tools like get_portfolio_summary or get_portfolio_history.

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

Usage Guidelines4/5

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

Explicitly says 'Use after recording a batch of transactions if you want immediate fresh numbers', providing a clear when-to-use scenario, though it could mention when not to use it or alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matthewdtowles/iwantmymtg-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server