Skip to main content
Glama
hvkshetry

inventree-mcp

by hvkshetry

stock

Manage inventory stock items and locations in InvenTree: list, create, update, transfer, count, add, remove stock, and upload test results. Filter by part or location, search, and paginate results.

Instructions

Stock item & location management in InvenTree.

Operations: Read: list, get, get_by_location, get_by_part, list_locations, get_location, get_tracking, get_test_results Write: create, update, transfer, count, add, remove, create_location, upload_test_result

Args: operation: One of the operations listed above. pk: Stock item or location ID. data: Dict of fields for create/update. part_id: Filter stock by part (for list, get_by_part). location_id: Filter stock by location or transfer destination. quantity: Quantity for transfer/count/add/remove operations. test_name: Name for upload_test_result. test_result: Boolean pass/fail for upload_test_result. search: Text search filter for list/list_locations. limit: Max results (default 25). offset: Pagination offset.

Returns: JSON string with stock/location data or {"error": "..."}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYes
pkNo
dataNo
part_idNo
location_idNo
quantityNo
test_nameNo
test_resultNo
searchNo
limitNo
offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations indicate readOnlyHint=false, destructiveHint=false, and idempotentHint=false. The description lists read and write operations, aligning with these hints, but does not disclose additional behavioral details such as authentication needs, error handling specifics, or side effects beyond the basic return description.

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 well-structured with a brief intro, an operation list, and a parameter list. It is front-loaded with the purpose. However, it is somewhat verbose and could be more concise by grouping operations or using tables.

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

Completeness3/5

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

Given the complexity (11 parameters, 13 operations) and the presence of an output schema, the description covers most aspects but lacks per-operation required parameters or expected outputs. It does not fully leverage the output schema to reduce description burden, leaving some gaps for new users.

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. It provides brief explanations for all 11 parameters, including their purpose and usage (e.g., 'pk: Stock item or location ID', 'quantity: Quantity for transfer/count/add/remove operations'). This adds value beyond the schema, though the 'operation' parameter lacks enumerations.

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 'Stock item & location management in InvenTree' and lists distinct operations for read and write, making the tool's purpose specific and distinct from sibling tools like 'part' or 'purchase_order'.

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 lists operations and parameters but does not explicitly state when to use this tool over alternatives like 'part' or 'build_order'. Usage context is implied through the operation names, but no when-not or comparison guidance is given.

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