Skip to main content
Glama

log_transaction

Append each settled Buy or Sell trade to a permanent Trade Log sheet, tagged by Plan ID, so Investment Plans totals recalculate automatically.

Instructions

Append one transaction row (Buy or Sell) to the permanent 'Trade Log' sheet, tagged with its Plan ID. Call this after a trade actually settles on-chain — one row per leg, so a DCA entry or a scaled take-profit exit produces several rows under the same Plan ID. The Investment Plans sheet recalculates its totals automatically from these rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesTransaction type. Must be exactly "Buy" or "Sell" — the spreadsheet's aggregate formulas filter on these literal strings.
notesNoShort note, e.g. '1st DCA leg' or 'TP1: 50% at +30%'.
planIdYesPlan ID this transaction belongs to, e.g. PLAN-0001.
priceUsdYesExecution price per token in USD.
tokenQtyYesNumber of tokens bought or sold.
amountUsdYesTotal USD value of this transaction.
tokenTickerYesToken ticker.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/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 disclose meaningful traits: the row is appended to a 'permanent' sheet (append-only semantics), one row per leg, and the Investment Plans sheet recalculates totals automatically from these rows. It omits error/duplicate handling and whether rows can later be amended, so not a 5.

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 tight sentences, front-loaded with the action and destination, then timing, then the multi-leg nuance, then the downstream effect. No sentence is filler.

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?

For a 7-parameter, no-annotation, no-output-schema tool, the description covers what it does, when to call it, and its side effects on the plans sheet. It stops short of stating the confirmation/return behavior, which would matter for an agent verifying the append succeeded.

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%, including the enum constraint on type and per-field descriptions, so the baseline is 3. The description adds the Plan-ID tagging concept but no format or validation detail beyond what the schema already provides.

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 and resource ('Append one transaction row ... to the permanent Trade Log sheet') plus the scoping key ('tagged with its Plan ID'). An agent can distinguish this record-keeping tool from execution siblings like execute_buy/execute_sell without opening 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 Guidelines4/5

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

'Call this after a trade actually settles on-chain' gives a clear triggering condition, and the one-row-per-leg rule (DCA entry or scaled TP exit produce several rows under one Plan ID) tells the agent when to call it repeatedly. It doesn't explicitly name execute_buy/execute_sell as the alternative it follows, so 4 rather than 5.

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