@allourthings/mcp-server 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +29 -13
  2. package/dist/index.js +7623 -7026
  3. package/package.json +3 -4
package/README.md CHANGED
@@ -52,17 +52,22 @@ Once connected, ask your AI assistant things like:
52
52
 
53
53
  | Tool | Description |
54
54
  |---|---|
55
- | `add_item` | Add a new item to your inventory |
56
- | `get_item` | Retrieve an item by ID or name |
57
- | `list_items` | List all items, optionally filtered by category, location, or tags |
58
- | `update_item` | Update fields on an existing item |
55
+ | `add_item` | Add a new item. Names must be unique; custom fields are kept as-is |
56
+ | `get_item` | Get an item by ID or name. If a name matches several items, the error lists their IDs |
57
+ | `list_items` | List items, optionally filtered by `category`, `subcategory` or `tags` (all must match) |
58
+ | `update_item` | Update fields on an item. Set a field to `null` to clear it |
59
59
  | `delete_item` | Delete an item by ID |
60
- | `search_items` | Full-text search across all item fields |
61
- | `add_attachment` | Attach a file (manual, receipt, photo, warranty) to an item |
62
- | `attach_from_url` | Download a file from a URL and attach it to an item |
63
- | `get_attachment` | Retrieve an attachment's contents |
60
+ | `search_items` | Search field values (case-insensitive); every word in the query must match |
61
+ | `get_item_fields` | List the field names in use across your catalog |
62
+ | `add_attachment` | Attach a file: `item_id`, `filename`, `kind`, `data_base64`, optional `label` |
63
+ | `attach_from_url` | Download a file and attach it: `item_id`, `url`, `kind`, optional `filename` and `label` |
64
+ | `get_attachment` | Get an attachment's contents as base64 |
64
65
  | `delete_attachment` | Remove an attachment from an item |
65
66
 
67
+ `kind` is one of `manual`, `receipt`, `photo`, `warranty` or `other`. If `attach_from_url` has no `filename`, it uses the server's `Content-Disposition` filename, or else the last part of the final URL.
68
+
69
+ **Errors.** Any failure — invalid or unknown arguments, an item that doesn't exist, a duplicate name, an invalid date — returns a result with `isError: true` and a message describing the problem.
70
+
66
71
  ## Vault structure
67
72
 
68
73
  Your inventory lives in a plain directory. Each item gets its own folder:
@@ -82,20 +87,31 @@ Attachments (manuals, receipts, photos) sit alongside the item JSON. The vault i
82
87
 
83
88
  ## Configuration
84
89
 
85
- The `--data-dir` arg controls where your inventory is stored. It defaults to `~/Documents/AllOurThings` if omitted. To use a different location, update the path in your MCP client config:
90
+ The server looks for your vault in this order:
86
91
 
87
- ```json
88
- "args": ["-y", "@allourthings/mcp-server", "--data-dir", "/path/to/your/vault"]
89
- ```
92
+ 1. `--data-dir <path>` in your MCP client config
93
+ 2. the `ALLOURTHINGS_DATA_DIR` environment variable
94
+ 3. the folder saved by [`allourthings init`](https://www.npmjs.com/package/@allourthings/cli)
95
+
96
+ If none is set, the server exits with an error explaining how to configure one. `--help` and `--version` print and exit.
97
+
98
+ A local query cache is kept outside the vault, in `~/Library/Caches/allourthings` (macOS), `%LOCALAPPDATA%\allourthings` (Windows) or `~/.cache/allourthings` (Linux). It is refreshed from the vault before lists and searches, so changes from the iOS app or other tools show up automatically. It is safe to delete.
90
99
 
91
100
  ## Item schema
92
101
 
93
102
  Required fields: `id`, `name`, `created_at`, `updated_at`
94
103
 
95
- Well-known optional fields: `category` `brand` `model` `purchase_date` `purchase_price` `currency` `warranty_expires` `retailer` `location` `features` `notes` `tags` `attachments`
104
+ Well-known optional fields: `category` `subcategory` `brand` `model` `purchase_date` `purchase_price` `currency` `warranty_expires` `retailer` `location` `features` `notes` `tags` `attachments`
96
105
 
97
106
  Custom fields are preserved as-is — add anything you like.
98
107
 
108
+ Rules enforced on every write:
109
+
110
+ - `name` must not be empty and must be unique (ignoring case and surrounding spaces)
111
+ - `purchase_date` and `warranty_expires` must be `YYYY-MM-DD` (or a full ISO 8601 timestamp)
112
+ - `purchase_price` must be a non-negative number
113
+ - `id`, `created_at`, `updated_at` and `attachments` are managed for you and can't be set directly
114
+
99
115
  ---
100
116
 
101
117
  [allourthings.io](https://allourthings.io)