How to use it?
Basic Command Structure
Parameters
Required:action
- Operation to perform (create, read, update, delete, search, list)collection
- Collection ID for data isolation (automatically set when you select a collection from the slash command menu)
key
- Primary identifier for your itemitemId
- Unique document IDkey
+sortField
- Primary and secondary identifiers for specific item
sortField
- Secondary identifier that makes the item unique when combined with keycontent
- The main content of your itemmetadata
- Custom attributes as a JSON objecttriggerUrls
- Array of trigger objects that fire when the item changes (see Triggers section)
Response Format
Single item:Tools
Create/Update Item
Create a new item or update an existing one. If key and sortField already exist, this will update the existing item. Parameters:action
(required) - Set to “create” or “update”key
(required) - Primary identifiercontent
(optional) - Item contentsortField
(optional) - Secondary identifiermetadata
(optional) - Custom attributestriggerUrls
(optional) - Array of trigger objects (see Triggers section)triggerChanges
(optional) - Set to false to prevent firing triggers
Read Items
Retrieve items from the datastore Parameters:action
(required) - Set to “read” or “get”
key
- Primary identifier (returns all items with that key)key
+sortField
- Primary and secondary identifiers for specific itemitemId
- Unique document ID
List All Items
Retrieve all items with optional filtering and pagination Parameters:action
(required) - Set to “list”limit
(optional) - Maximum number of results (default: 50, max: 1000)orderedBy
(optional) - Sort field and direction (e.g., “createdAt:desc”)format
(optional) - Set to “light” for minimal information
Update Item by ID
Update an existing item using its unique ID Parameters:action
(required) - Set to “update”itemId
(required) - Unique document IDcontent
(optional) - Updated contentmetadata
(optional) - Updated metadatatriggerChanges
(optional) - Set to false to prevent firing triggers
Delete Item
Remove an item from the datastore Parameters:action
(required) - Set to “delete”
itemId
- Unique document ID (recommended)key
- Primary identifier (deletes all items with that key)key
+sortField
- Primary and secondary identifiers for specific item
Search Items
Search for items in the datastore with advanced filtering Parameters:action
(required) - Set to “search”q
(required) - Search query stringfield
(optional) - Field to search: “all” (default), “content”, “sortField”, “key”type
(optional) - Search type: “fuzzy” (default), “exact”, “prefix”threshold
(optional) - Fuzzy sensitivity 0.0 (strict) to 1.0 (lenient), default: 0.3limit
(optional) - Max results (default: 50, max: 1000)compiled
(optional) - Output format: false (default - JSON with snippets), true (plain text)content.*
(optional) - Filter by content fieldsmetadata.*
(optional) - Filter by metadata fields
What can you do with it?
Store, retrieve, update, and search data in a NoSQL datastore. Perfect for managing structured data with key-value pairs, metadata, and optional sorting capabilities. Ideal for user preferences, application state, dynamic content, and any data that needs persistent storage with search functionality.Key and Sort Field Fundamentals
Important Rules
- The combination of
key
+sortField
must be unique within a collection - If you don’t specify a
sortField
, one will be automatically generated for you - You can have multiple items with the same
key
as long as they have differentsortField
values - Think of
key
as a folder name andsortField
as a unique identifier within that folder - Working with
itemId
is the most direct and efficient way to interact with datastore items
Key and Sort Field Patterns
-
Single Key Only (Auto-generated Sort Field)
- Sort field will be auto-generated
- Good for: Quick storage when uniqueness isn’t a concern
-
Key + Date Sort Field
- Creates unique daily entries
- Good for: Time-series data, daily logs
-
Key + Email Sort Field
- One record per employee
- Good for: Per-user data
-
Key + Category Sort Field
- Unique identifier within category
- Good for: Categorized items requiring unique IDs
Examples
Project Documentation
Sales Reports by Region
Employee Training Records
Product Inventory by Category
Triggers
Datastore supports event-driven triggers that automatically start workflows when data changes. Triggers can be set at two levels: collection-wide (affects all items) or item-specific (affects individual items).Trigger Events
- onCreate: Fires when new items are created (collection-level only)
- onEdit: Fires when existing items are modified (collection or item level)
- onDelete: Fires when items are deleted (collection or item level)
Trigger Levels
Collection-Level Triggers: Set on the entire data collection to monitor all items- Automatically fire for every item in the collection
- Perfect for system-wide monitoring and processing
- Set via data collection management interface
- Only fire for that particular item
- Ideal for monitoring critical or sensitive data points
- Set via the
triggerUrls
parameter when creating/updating items
Trigger Structure
Triggers use an array format with multiple trigger objects:Trigger Payload
When triggers fire, they receive detailed information about the event: For onCreate and onDelete events:changed
field):
Examples
Creating Item with Multiple Triggers
Updating Item Status (Will Fire onEdit Triggers)
Updating Without Triggering
Testing Triggers
Use the test-trigger endpoint to verify your trigger setup:Rate Limiting and Logs
- Rate Limiting: onEdit triggers are limited to 2 executions per minute per item to prevent infinite loops
- Trigger Logs: All trigger executions are logged with status, execution time, and error details
- Error Handling: Failed triggers are logged but don’t prevent the original data operation from completing
Best Practices
- Use Collection-Level Triggers for system-wide monitoring (e.g., audit logs, analytics)
- Use Item-Level Triggers for specific business logic (e.g., order processing, user notifications)
- Set triggerChanges: false when updating items programmatically to avoid recursive triggers
- Test triggers thoroughly using the test-trigger endpoint before production use
- Monitor trigger logs to ensure reliable execution and debug issues
Notes
- Items are uniquely identified by key + sortField combination within a collection
- Use itemId for direct access to specific items (most efficient method)
- Search supports fuzzy, exact, and prefix matching with configurable thresholds
- Triggers can notify external URLs on data changes
- When updating, only sent values are replaced; others remain unchanged
- GET operations by key/sortField return an array of items, but GET operations by specific itemId return a single object
- When you select a collection from the slash command menu, the collection ID is automatically preset for you