Skip to main content
Glama

Compare count

compare_count
Destructive

Compare what was scanned in a count with the stock the system expects, and save the result as lines. Run it after scans or batches change and before reading lines with list_count_lines. It reads the current stock for every scanned barcode, so it can be slow on a large count, and only one compare runs at a time per count. Returns comparedAt and the summary. It deletes lines that no longer belong to the count and clears decisions on lines that have to be recomputed, so tell the user before running it on a count that already has decisions. An applied count is read-only. Requires the stock plan feature.

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": {
      "count_id": "<count_id>"
    },
    "name": "compare_count"
  }
}

Input Schema

NameRequiredDescriptionDefault
count_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (destructive, non-idempotent, not read-only), it discloses the concrete destruction: lines that no longer belong are deleted and decisions on recomputed lines are cleared, with advice to warn the user. It also adds performance and concurrency behavior ('can be slow on a large count', 'only one compare runs at a time per count') and the return payload (comparedAt and summary).

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?

The action and its output are front-loaded, followed by sequencing, then cost/concurrency, then destructive side effects and constraints. Every sentence adds distinct operational information with no 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 destructive, single-parameter tool with no output schema, the description covers sequencing, prerequisites, side effects, performance, concurrency, and return fields. An agent has everything needed to decide whether and when to call it.

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% for the single count_id parameter, so the description carries the burden; repeated references to 'a count' and 'per count' make clear the parameter scopes the operation to one count. It does not state the identifier's format or where to obtain it, which keeps it short of a 5.

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?

The description states a specific verb and resource: it compares scanned quantities against expected stock for a count and persists the result as lines. It explicitly distinguishes itself from the sibling list_count_lines, which is named as the read step that follows.

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?

It gives explicit timing ('after scans or batches change and before reading lines with list_count_lines'), names the read alternative, states a hard exclusion ('an applied count is read-only'), and lists a prerequisite ('requires the stock plan feature').

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.

Resources