---
title: "Read inventory"
description: "Read product inventory levels, product movements, the organization movement register, grouped inventory operations, or the movements within one inventory operation."
language: en
canonical_url: "https://exac.mx/docs/en/mcp/tools/get_inventory"
md_url: "https://exac.mx/docs/en/mcp/tools/get_inventory.md"
---

# Read inventory

Read product inventory levels, product movements, the organization movement register, grouped inventory operations, or the movements within one inventory operation.

Tool: `get_inventory`

## Purpose

Read inventory levels, movements, or grouped movement operations.

### Use when

You need current stock or inventory history.

### Do not use when

You need to change stock or receive a supplier delivery.

| Detail | Value |
| --- | --- |
| Permissions | products:read |
| Side effects | None |
| Idempotency | Idempotent |

## Input schema

```json
{
  "type": "object",
  "properties": {
    "input": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "inventory_levels"
            },
            "productId": {
              "type": "string"
            },
            "cursor": {
              "$ref": "#/definitions/__schema0"
            },
            "limit": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": [
            "operation",
            "productId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "movements"
            },
            "view": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "productId": {
              "type": "string"
            },
            "locationId": {
              "type": "string"
            },
            "searchQuery": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "dateFrom": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "dateTo": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "cursor": {
              "$ref": "#/definitions/__schema0"
            },
            "limit": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": [
            "operation"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "inventory_operations"
            },
            "view": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema2"
                }
              ]
            },
            "productId": {
              "type": "string"
            },
            "locationId": {
              "type": "string"
            },
            "supplierId": {
              "type": "string"
            },
            "sourceType": {
              "type": "string",
              "enum": [
                "manual",
                "sale",
                "inventory_receipt",
                "import"
              ]
            },
            "searchQuery": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "dateFrom": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "dateTo": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "cursor": {
              "$ref": "#/definitions/__schema0"
            },
            "limit": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": [
            "operation"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "type": "string",
              "const": "inventory_operation_movements"
            },
            "operationId": {
              "type": "string"
            },
            "cursor": {
              "$ref": "#/definitions/__schema0"
            },
            "limit": {
              "$ref": "#/definitions/__schema1"
            }
          },
          "required": [
            "operation",
            "operationId"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "input"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "definitions": {
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "__schema2": {
      "type": "string",
      "enum": [
        "register",
        "entries",
        "exits",
        "returns"
      ]
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "properties": {
    "data": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "levels": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "inventoryLevelId": {
                    "type": "string"
                  },
                  "productId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "locationId": {
                    "type": "string"
                  },
                  "locationName": {
                    "type": "string"
                  },
                  "stock": {
                    "type": "number"
                  },
                  "stockStatus": {
                    "type": "string",
                    "enum": [
                      "available",
                      "out_of_stock"
                    ]
                  },
                  "updatedAt": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "required": [
                  "inventoryLevelId",
                  "productId",
                  "locationId",
                  "locationName",
                  "stock",
                  "stockStatus",
                  "updatedAt"
                ],
                "additionalProperties": false
              }
            },
            "nextCursor": {
              "$ref": "#/definitions/__schema2"
            },
            "hasMore": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": [
            "levels",
            "nextCursor",
            "hasMore"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "movements": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "movementId": {
                    "type": "string"
                  },
                  "productId": {
                    "$ref": "#/definitions/__schema0"
                  },
                  "productCode": {
                    "type": "string"
                  },
                  "productSku": {
                    "type": "string"
                  },
                  "productDescription": {
                    "type": "string"
                  },
                  "productDeleted": {
                    "type": "boolean"
                  },
                  "locationId": {
                    "type": "string"
                  },
                  "locationName": {
                    "type": "string"
                  },
                  "businessDate": {
                    "type": "string"
                  },
                  "businessTimeZone": {
                    "type": "string"
                  },
                  "delta": {
                    "type": "number"
                  },
                  "direction": {
                    "$ref": "#/definitions/__schema4"
                  },
                  "reason": {
                    "$ref": "#/definitions/__schema5"
                  },
                  "resultingStock": {
                    "type": "number"
                  },
                  "resultingStockScope": {
                    "type": "string",
                    "enum": [
                      "aggregate",
                      "location"
                    ]
                  },
                  "sourceType": {
                    "$ref": "#/definitions/__schema6"
                  },
                  "sourceLabel": {
                    "type": "string"
                  },
                  "receiptDocumentRef": {
                    "type": "string"
                  },
                  "cfdiDocumentRef": {
                    "type": "string"
                  },
                  "inventoryReceiptId": {
                    "type": "string"
                  },
                  "supplierId": {
                    "type": "string"
                  },
                  "supplierName": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "actorIdentifier": {
                    "type": "string"
                  },
                  "actorName": {
                    "type": "string"
                  },
                  "createdAt": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "required": [
                  "movementId",
                  "productId",
                  "productDescription",
                  "productDeleted",
                  "delta",
                  "direction",
                  "reason",
                  "resultingStock",
                  "resultingStockScope",
                  "sourceType",
                  "sourceLabel",
                  "createdAt"
                ],
                "additionalProperties": false
              }
            },
            "nextCursor": {
              "$ref": "#/definitions/__schema2"
            },
            "hasMore": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": [
            "movements",
            "nextCursor",
            "hasMore"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "operations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "operationId": {
                    "type": "string"
                  },
                  "businessDate": {
                    "type": "string"
                  },
                  "businessTimeZone": {
                    "type": "string"
                  },
                  "direction": {
                    "$ref": "#/definitions/__schema4"
                  },
                  "reason": {
                    "$ref": "#/definitions/__schema5"
                  },
                  "sourceType": {
                    "$ref": "#/definitions/__schema6"
                  },
                  "sourceLabel": {
                    "type": "string"
                  },
                  "sourceReference": {
                    "type": "string"
                  },
                  "itemCount": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "locationId": {
                    "type": "string"
                  },
                  "locationName": {
                    "type": "string"
                  },
                  "supplierId": {
                    "type": "string"
                  },
                  "supplierName": {
                    "type": "string"
                  },
                  "receiptDocumentRef": {
                    "type": "string"
                  },
                  "inventoryReceiptId": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "actorIdentifier": {
                    "type": "string"
                  },
                  "actorName": {
                    "type": "string"
                  },
                  "createdAt": {
                    "$ref": "#/definitions/__schema1"
                  }
                },
                "required": [
                  "operationId",
                  "direction",
                  "reason",
                  "sourceType",
                  "sourceLabel",
                  "itemCount",
                  "createdAt"
                ],
                "additionalProperties": false
              }
            },
            "nextCursor": {
              "$ref": "#/definitions/__schema2"
            },
            "hasMore": {
              "$ref": "#/definitions/__schema3"
            }
          },
          "required": [
            "operations",
            "nextCursor",
            "hasMore"
          ],
          "additionalProperties": false
        }
      ]
    },
    "error": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "validation_error",
            "unauthenticated",
            "forbidden",
            "not_found",
            "method_not_allowed",
            "conflict",
            "idempotency_conflict",
            "operation_in_progress",
            "recovery_required",
            "rate_limited",
            "provider_unavailable",
            "internal"
          ]
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    }
                  },
                  "message": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "retryable": {
              "type": "boolean"
            },
            "retryAfterSeconds": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "definitions": {
    "__schema0": {
      "type": "string",
      "minLength": 1
    },
    "__schema1": {
      "type": "string",
      "format": "date-time"
    },
    "__schema2": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema3": {
      "type": "boolean"
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "entry",
        "exit",
        "neutral"
      ]
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "initial",
        "sale",
        "sale_reversal",
        "restock",
        "adjustment"
      ]
    },
    "__schema6": {
      "type": "string",
      "enum": [
        "manual",
        "sale",
        "inventory_receipt",
        "import"
      ]
    }
  },
  "oneOf": [
    {
      "required": [
        "data"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
```

## Related tools

- [`save_product`](/docs/en/mcp/tools/save_product.md) — **Save product**: Create a product or update an existing product in the organization catalog. operation selects create or update.

- [`update_inventory`](/docs/en/mcp/tools/update_inventory.md) — **Update inventory**: Set or restock a product inventory level. mode selects whether stock is replaced or increased.

- [`receive_inventory`](/docs/en/mcp/tools/receive_inventory.md) — **Receive inventory**: Record a multi-product supplier inventory delivery at a location.

## Related workflow

[See the canonical workflows in the introduction](/docs/en.md)

## Equivalent REST operations

- [`GET /v1/inventory-movements`](/docs/en/api/catalog/products/list-inventory-movements.md)

- [`GET /v1/inventory-movement-operations`](/docs/en/api/catalog/products/list-inventory-movement-operations.md)

- [`GET /v1/inventory-movement-operations/{operationId}/movements`](/docs/en/api/catalog/products/list-inventory-operation-movements.md)

- [`GET /v1/products/{productId}/inventory-levels`](/docs/en/api/catalog/products/list-product-inventory-levels.md)

Complete documentation: https://exac.mx/docs/en.md
Agent documentation index: https://exac.mx/docs/en/llms.txt
