Skip to main content
Glama

Set opening cost

inv_set_opening_cost

What one unit was worth when it came in without a cost: stock on hand before these books, or a correction received by hand. Everything after it is derived. Only for stock that came in without a cost. Take the figure from a record the person has: the last supplier invoice, a stock sheet, the accountant's figure. Never estimate it yourself, and never use the selling price. It is the one cost anyone states; every other cost is derived from what was paid on purchase orders. Changing it later re-derives everything after it, so say why. Effects: opening cost stated; average cost, value and cost of goods sold re-derived.

Input Schema

NameRequiredDescriptionDefault
reasonYesWhere the figure comes from: "last Bay Gasket invoice, March".
item_idYesThe item. An existing item id.
unit_costYesWhat one unit was worth. In cents (integer minor units) — 1250 means $12.50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description adds real value beyond them: the cascade effect ('average cost, value and cost of goods sold re-derived') and the requirement to justify changes because re-derivation is retroactive. It stops short of saying whether the call fails if an opening cost already exists, but the added context is substantial.

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?

Front-loaded with the definition, then scope, then sourcing rules, then effects — a sensible order. It is somewhat wordy ('It is the one cost anyone states') and could be trimmed, but no sentence is filler.

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 3-parameter mutation with no output schema, the description covers what the tool does, when it applies, where the input must come from, and what downstream figures change. That is everything an agent needs to call it correctly and explain the consequence.

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%, so the baseline is 3; the description nonetheless adds semantics the schema lacks — unit_cost must be sourced from a real record, never estimated and never the selling price, and reason must explain the provenance and the motive for a change. These are genuine constraints, not restatements.

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 (setting the opening cost of an item) and defines the exact scope: 'stock on hand before these books, or a correction received by hand.' It also draws the boundary against all other cost data by noting 'every other cost is derived from what was paid on purchase orders,' so an agent can distinguish it from valuation/cost-of-sales siblings.

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

Usage Guidelines5/5

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

Explicit when-to-use ('Only for stock that came in without a cost'), explicit exclusions ('Never estimate it yourself, and never use the selling price'), and a positive sourcing rule (last supplier invoice, stock sheet, accountant's figure). An agent knows both the trigger and the acceptable inputs.

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.