Skip to main content
Glama
hvkshetry

inventree-mcp

by hvkshetry

barcode

Scan barcodes to look up items or assign barcodes to inventory objects like parts, stock, and orders.

Instructions

Barcode scanning and assignment in InvenTree.

Operations: Read: scan, lookup Write: assign, unassign

Args: operation: One of the operations listed above. barcode_data: Barcode string for scan/assign/lookup. model_type: Model type for assign/unassign (part, stockitem, stocklocation, build, purchaseorder, salesorder, returnorder). pk: Object ID for assign/unassign.

Returns: JSON string with barcode result or {"error": "..."}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYes
barcode_dataNo
model_typeNo
pkNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Beyond annotations (which indicate read/write but not details), the description discloses that the tool supports both read and write operations, lists the specific operations, and describes the return format (JSON string with result or error). This adds behavioral context that annotations alone do not provide.

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 structured with a one-line summary, a bulleted list of operations, and a clear args section. It is appropriately sized with no extraneous text, though it could be slightly more succinct by integrating the operation list inline.

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 the tool's complexity (4 parameters, 1 required) and the presence of an output schema, the description covers the operation types, all parameters, and the return format. It provides sufficient context for an agent to understand and invoke the tool correctly.

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 input schema has 0% description coverage on parameters. The description compensates fully by explaining each parameter: operation as 'one of the operations listed above', barcode_data as 'Barcode string for scan/assign/lookup', model_type as the specific model types for assign/unassign, and pk as 'Object ID for assign/unassign'. This adds essential meaning beyond the schema.

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 clearly states 'Barcode scanning and assignment in InvenTree' and enumerates specific operations (read: scan, lookup; write: assign, unassign). This provides a specific verb and resource, distinguishing it from sibling tools like 'part' or 'stock' which handle other domains.

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

Usage Guidelines3/5

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

The description implies usage for barcode operations but does not explicitly guide when to use this tool versus alternatives. No exclusion criteria or comparative guidance is given, relying on the agent to infer context from the tool name and domain.

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