Skip to main content
Glama

Weighted Average Stock Issue

bpj_weighted_average_stock_issue
Read-onlyIdempotent

Pool two stock lots at weighted-average cost before allocating the issue cost and residual inventory value.

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": {
      "first": "<first>",
      "firstCost": "<firstCost>",
      "second": "<second>",
      "secondCost": "<secondCost>",
      "issue": "<issue>"
    },
    "name": "bpj_weighted_average_stock_issue"
  }
}

Input Schema

NameRequiredDescriptionDefault
firstYes
issueYes
secondYes
firstCostYes
secondCostYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed world, so safety is covered. The description adds real value by saying the two lots are pooled at weighted-average cost before the issue cost and residual value are allocated, which explains the computation. It still omits edge behavior such as issuing more than total units, rounding of unit cost, or whether the older/newer ordering affects the result.

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?

It is a single well-formed sentence with the core operation front-loaded and no filler. Given five required parameters and no output schema, the terseness borders on under-specification rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and 0% parameter description coverage, the description should carry the burden of explaining what comes back (issue cost, residual inventory value) and any constraints. It hints at the outputs but does not define their form, precision, or the handling of boundary inputs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across five required parameters; only bare titles exist. The description gestures at 'two stock lots' and 'issue cost and residual inventory value' but does not clarify that firstCost and secondCost are per-unit costs, whether units and costs are interchangeable in ordering, or that the issue quantity must not exceed the combined lot units.

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 states a specific verb and resource: pooling two stock lots at weighted-average cost and then allocating issue cost and residual inventory value. That is clearly distinct from FIFO-style lot issuing, but the description never names the FIFO sibling as an alternative, so the differentiation is implicit rather than stated.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance. An agent choosing between this and bpj_fifo_lot_issue or bpj_design_stock_batch_weight gets no criteria from the description, only from the tool name itself.

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.