Skip to main content
Glama

search_products

Find any product by name, description, or barcode across the full catalog. Check in_stock flags to verify availability, catch duplicates before creating, and confirm naming before stock changes.

Instructions

Find products by name, description, or barcode — across the whole catalog, not just what's currently on the shelf.

A miss means the product genuinely doesn't exist in Grocy. A hit's in_stock flag says whether there's actually any on hand right now — a hit with in_stock: false is a known product sitting at zero, not a false positive. Check this before create_product to catch an existing or near-duplicate product, and before add_stock/consume_product when unsure how something is named.

Args: query: Case-insensitive substring, or a full GTIN/EAN barcode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure and does it well: it explains what a miss means, what in_stock: false means, and asserts that misses are genuine non-existence rather than search failures. It does not discuss read-only guarantees, rate limits, or full response shape, but it covers the most decision-relevant behavior.

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 description is front-loaded with the core purpose, and every subsequent sentence earns its place by explaining miss semantics, hit semantics, or when to call the tool. No filler or redundancy.

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 a single-parameter search tool with no annotations and no output schema, the description is nearly complete: it explains input formats, result interpretation, and key workflows. It could go slightly further by listing the expected return fields beyond in_stock, but that is not essential for correct invocation.

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

Parameters5/5

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

The schema only defines query as a string, but the description adds crucial meaning: it accepts a case-insensitive substring or a full GTIN/EAN barcode. This fully equips the agent to format the parameter correctly.

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 a specific verb and resource: 'Find products by name, description, or barcode.' It also scopes the operation to the whole catalog, which distinguishes it from shelf/stock-focused sibling tools like list_stock or expiring_soon.

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 explicitly directs the agent to call this before create_product to detect duplicates and before add_stock/consume_product when naming is uncertain. It does not name alternative tools explicitly, but the catalog vs. shelf distinction implicitly excludes stock-status-only lookups.

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