Skip to main content
Glama

link_transaction_to_portfolio

Link an existing regular transaction to an investment portfolio as a cash transfer. An expense transaction moves cash from its account into the portfolio; an income transaction moves cash from the portfolio to its account. The transaction must not already be a transfer or linked to a portfolio. Returns the created portfolio transfer.

Input Schema

NameRequiredDescriptionDefault
portfolioIdYesPortfolio ID (from get_portfolios)
transactionIdYesID of the existing transaction (from search_transactions)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the required pre-state of the transaction, the cash-flow direction per transaction type, and that a portfolio transfer object is returned. It stops short of stating failure behavior, reversibility (unlink_transaction_from_portfolio), or any permission requirements.

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?

Three sentences, zero padding, front-loaded with the action and followed by the directional rules and the constraint. Every sentence carries distinct information.

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 two-parameter linking tool with no output schema, the description covers the action, the two directional cases, the eligibility constraint, and the return value. An agent has everything needed to call it correctly.

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 100% and both parameters already document their source tools (get_portfolios, search_transactions), so the baseline is 3. The description goes beyond the schema by explaining the semantic consequence of linking a given transaction type, which informs how the agent should choose the transactionId.

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?

States a specific verb+resource ('Link an existing regular transaction to an investment portfolio') and immediately elaborates the directional semantics for expense vs income transactions, which no sibling tool offers. The precondition ('must not already be a transfer or linked to a portfolio') cleanly separates it from link_transfer and link_transactions_to_subscription.

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?

Gives clear context for when the tool applies: an existing regular (non-transfer, non-portfolio-linked) transaction, plus the effect for each transaction direction. It does not name alternative tools it might be confused with (link_transfer, create_portfolio_cash_transaction, transfer_account_to_portfolio), so the when-not guidance is implicit rather than explicit.

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.