Skip to main content
Glama
yzyx
by BerBai

yzyx_add_record

Adds an investment ledger entry to a specified account with date, amount, comment, and transfer type; validates and deduplicates submissions to prevent duplicate records.

Instructions

【写操作】给投资记账账户记一笔流水(经 abook_record.py 子进程)。 account=账户 id;date=YYYY-MM-DD;amount=金额;comment=备注(与 date+comment+类型做去重,同笔重复提交会返回 skipped); channel=渠道名(多渠道账户必填,单金额账户留空); type=TRANSFER_IN 投入 / TRANSFER_OUT 转出 / TRANSFER_TO 转到 (TRANSFER_TO 需 to_account,可选 to_amount 到账金额)。 提交后脚本内读回验证,status=added 表示已核实落账。

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": {
      "account": "<account>",
      "date": "<date>",
      "amount": "<amount>",
      "comment": "<comment>"
    },
    "name": "yzyx_add_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYes
typeNoTRANSFER_IN
amountYes
accountYes
channelNo
commentYes
to_amountNo
to_accountNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.3

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full load and does well: it discloses that records are de-duplicated on date+comment+type and that a repeat submission returns skipped, which is critical idempotency behavior. It also states the script reads back the entry after submission and that status=added means the write was verified. It omits permission/auth requirements and what happens on validation failure.

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?

The write-operation marker and the subprocess note are front-loaded, followed by a compact semicolon-separated parameter map, so an agent can scan it quickly. The dense run-on style with parenthetical caveats is efficient but slightly harder to parse than short bulleted segments would be.

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 an eight-parameter mutation tool with no annotations, the description covers the essentials an agent needs: transfer-mode dependencies, dedupe and skip semantics, channel conditionality, and post-write verification. Return-value detail is legitimately deferred to the existing output schema, leaving only cross-tool routing guidance as a real gap.

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 description coverage is 0%, so the description must define all eight parameters, and it nominally does: account id, date as YYYY-MM-DD, amount, comment (with the dedupe key), channel conditional logic, type with its three TRANSFER_* values, plus to_account and to_amount for transfers. The glosses are terse — amount format/precision and sign conventions are never specified — but every parameter receives meaning the bare schema lacks.

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 names a specific verb and resource: writing a transaction record into an investment bookkeeping account, marked 【写操作】 and noting it runs via the abook_record.py subprocess. It is clearly a create/write sibling to readers like yzyx_overview or yzyx_search, though it never explicitly contrasts itself with other write tools such as yzyx_cashflow_write or yzyx_update_assets.

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?

Conditional usage guidance is present and useful: channel is required for multi-channel accounts and should be left blank for single-amount accounts, and TRANSFER_TO requires to_account with optional to_amount. However, there is no statement of when to choose this tool over the other write tools in the family, so the agent must infer routing.

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