Skip to main content
Glama

add_items

Record purchased items from a receipt into your household inventory. Uses idempotent keys to avoid duplicates and returns counts of inserted, ignored, or rejected items.

Instructions

Record a purchase (one receipt). Idempotent per (source_ref, line_no).

Each item: {name, quantity, unit, price?, category?, line_no}. source: 'email' (purchased_at required — the receipt has a date) or 'manual' (purchased_at defaults to today). source_ref: retailer ORDER ID where extractable, else email Message-ID; manual fallback 'manual:::' (+':2' suffix on collision — a nonzero 'ignored' count on a fresh receipt signals one). Call get_stock() first and reuse existing item names exactly. Returns {inserted, ignored, rejected: [{line_no, reason}]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
sourceYes
locationNo
source_refYes
purchased_atNo
Behavior5/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It discloses idempotency per (source_ref, line_no), source-specific defaults, collision handling with '+':2' suffix, and the exact return shape {inserted, ignored, rejected: [{line_no, reason}]}.

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 description is dense and front-loaded with the primary purpose. It uses compact structured examples and line breaks to convey a lot of information efficiently. It is somewhat long, but every sentence contributes meaningful constraints or behavior.

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?

Given no annotations and no output schema, the description is exceptionally complete: it covers input parameters, defaults, idempotency, return values, edge cases, and even instructs to consult get_stock() first. Only the 'location' parameter is omitted, but the overall tool behavior is well specified.

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 compensate, and it largely does. It explains items structure, source values, source_ref patterns, and purchased_at defaults. However, the 'location' parameter is not mentioned at all, leaving one of five parameters unexplained.

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 opens with 'Record a purchase (one receipt)', which is a specific verb and resource. It clearly distinguishes the tool from siblings by covering source types, idempotency, and interaction with get_stock().

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?

The description provides explicit guidance on when to use the tool ('Record a purchase'), and even instructs to 'Call get_stock() first and reuse existing item names exactly.' It does not explicitly state when not to use it, but the context around source/ref handling makes usage clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Thomaspeel6/HomeStock'

If you have feedback or need assistance with the MCP directory API, please join our Discord server