Skip to main content
Server path: /datastore-structured | Type: Embedded | PCID required: No

Tools

ToolDescription
datastore-structured_batch_create_itemsCreate multiple rows at once (max 500). More efficient than calling datastore-structured_create_item repeatedly. Call datastore-structured_get_collection first to discover column labels and select options. For “select” type fields, values MUST be one of the allowed options from the schema.
datastore-structured_create_collectionCreate a new datastore collection (table with defined columns/schema). For unstructured storage, use the datastore-unstructured server. Returns { id, isStructured, schema } - use the “id” field as collectionId for subsequent operations.
datastore-structured_create_collection_from_csvCreate a new datastore from a CSV file. Auto-generates schema from CSV headers. Just provide a file URL and collection name - schema is inferred automatically. Returns { collectionId, imported, total, schema } - use the “collectionId” field for subsequent operations.
datastore-structured_create_collection_with_templateCreate a new datastore with a pre-built template. Templates include schema and sample data to get started quickly. Use datastore-structured_list_templates first to see available options. Returns { id, isStructured, schema } - use the “id” field as collectionId for subsequent operations.
datastore-structured_create_itemCreate a new row (or update if key exists). Call datastore-structured_get_collection first to discover column labels and select options. For “select” type fields, values MUST be one of the allowed options from the schema. Returns { id, key } - use “id” as itemId for get/update/delete operations.
datastore-structured_delete_itemDelete a single row by itemId (recommended) or by key. Using key without sortField deletes ALL items with that key. Prefer itemId for precision.
datastore-structured_delete_collectionDelete a datastore collection and all its data. Returns { message } on success. WARNING: This is a destructive operation that cannot be undone.
datastore-structured_get_collectionREQUIRED: Get collection schema before any write operations. Returns column labels, field types, and allowed options for select fields. Always call this first to understand the table structure.
datastore-structured_get_itemGet a single item (row) by its itemId. Use when you have the specific item ID from a previous operation. Returns full item data (content with field values, metadata, timestamps). For encrypted content, set decryptSecrets=true.
datastore-structured_get_item_by_keyGet item(s) by their key. Use when you know the item key but not the itemId. Returns array of all items with matching key, or single item if sortField also provided.
datastore-structured_import_dataImport data from a CSV file into an existing datastore. CSV column headers must match schema field labels. Returns { imported, total, failed } with counts.
datastore-structured_list_collectionsList all available structured datastore collections (tables with schemas). Returns an array of collections, each with { id, name, type, schema }. Use the “id” field as collectionId for subsequent operations. For unstructured data, use the datastore-unstructured server.
datastore-structured_list_itemsList/browse items (rows) with pagination and sorting. Returns items with pagination metadata (totalCount, hasNextPage, hasPrevPage). Use format=“full” to include item content, or “light” for metadata only. Supports sorting by any column name (e.g. “Amount:desc”) or system fields (createdAt, updatedAt, key, sortField).
datastore-structured_list_templatesList available templates for creating datastores. Returns an array of templates, each with { id, name, description, category, schema }. Use the template “id” when calling datastore-structured_create_collection_with_template.
datastore-structured_migrate_sortfieldChange default sort order and regenerate sortField for all items. Long-running (30-60s for large collections). Use when you need to change how items are ordered by default.
datastore-structured_analytics_queryRun analytics on collection data using natural language. Translates questions into BigQuery aggregations (COUNT, SUM, AVG, MIN, MAX), groupings, computed columns, and filtered summaries. Returns dynamic columns and rows — not full datastore items. Use this for questions like “how many rows by status?”, “average salary by department”, “top 10 products by revenue”, “count of items created per month”. For filtering/returning full rows, use datastore-structured_natural_query instead.
datastore-structured_natural_queryQuery data using natural language. Two modes:
• “natural-search” — filters and returns matching rows (e.g. “active users from last week”). • “natural-answer” — generates an AI analysis with calculations (e.g. “what is average age?”). PAGINATION (natural-search only): The first call translates your query into SQL via an LLM. The response includes a translation object and pagination metadata. To fetch the next page, pass the SAME translation back (this skips the LLM) and increment offset by your limit. Example — page through 100 items at a time: Page 1: { query: “active users”, mode: “natural-search”, limit: 100 } Page 2: { query: “active users”, mode: “natural-search”, limit: 100, offset: 100, translation: <translation from page 1> } Page 3: { query: “active users”, mode: “natural-search”, limit: 100, offset: 200, translation: <translation from page 1> } Stop when pagination.hasNextPage is false. RETURN ALL (natural-search only): Set returnAll: true to fetch every matching row in one call (up to 50,000 rows). WARNING: The response payload is limited to ~6 MB (AWS Lambda). Wide rows or large text fields may hit this before 50,000. If you get a payload error, switch to paginated mode with a smaller limit. CHOOSING A LIMIT: You control the page size via limit. Pick a value that balances throughput vs. payload size. Common choices: 100-500 for interactive use, 1000-5000 for batch processing, returnAll for workflows needing the full dataset. | | datastore-structured_search | Search rows by text query with fuzzy/exact/prefix matching. Use when you need to find items containing specific text but don’t know their key or ID. Supports field-specific search (content, key, sortField). For structured queries, prefer datastore-structured_natural_query. | | datastore-structured_update_item | Update an existing row by itemId (partial update). Provide only the fields you want to change - other fields remain unchanged. For “select” type fields, values MUST match one of the allowed options from the schema. Requires itemId (from create/list/get operations). | | datastore-structured_update_schema | Modify schema to add/remove/rename columns. Field IDs (f_1, f_2) remain stable when renaming. Must provide complete schema with all fields. |

datastore-structured_batch_create_items

Create multiple rows at once (max 500). More efficient than calling datastore-structured_create_item repeatedly. Call datastore-structured_get_collection first to discover column labels and select options. For “select” type fields, values MUST be one of the allowed options from the schema. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID (not name) to add the items to - e.g. “KCny7nGXpBzWNYpJzC0b”. Use datastore-structured_list_collections tool to get collection ID.
itemsanyYesArray of items to create, each with key, content (string or object), optional metadata object, and optional sortField
triggerChangesbooleanNotrueWhether to trigger webhooks on change
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

datastore-structured_create_collection

Create a new datastore collection (table with defined columns/schema). For unstructured storage, use the datastore-unstructured server. Returns { id, isStructured, schema } - use the “id” field as collectionId for subsequent operations. Parameters:
ParameterTypeRequiredDefaultDescription
namestringYesDisplay name for the collection/table
descriptionstringNoOptional description of the collection purpose
typestringNo"datastore"Collection type - must be “datastore”
createdBystringYesUser ID creating the collection - use the current user ID or a service identifier
createdByNamestringYesDisplay name shown as creator - use the current user name or service name
templateIdstringNo"none"Template ID - use “none” for custom schema
schemaobjectYesSchema definition with fields array defining the table columns. Example: { “fields”: [{“id”: “f_1”, “label”: “Name”, “type”: “string”}, {“id”: “f_2”, “label”: “Age”, “type”: “number”}], “nextFieldId”: 3 }

datastore-structured_create_collection_from_csv

Create a new datastore from a CSV file. Auto-generates schema from CSV headers. Just provide a file URL and collection name - schema is inferred automatically. Returns { collectionId, imported, total, schema } - use the “collectionId” field for subsequent operations. Parameters:
ParameterTypeRequiredDefaultDescription
fileUrlstringYesURL to the CSV file (e.g. from filestorage, S3, or any publicly accessible URL)
namestringYesName for the new datastore collection
descriptionstringNoOptional description of the collection
createdBystringYesUser ID creating the collection - use the current user ID or a service identifier
createdByNamestringYesDisplay name shown as creator - use the current user name or service name
schemaobjectNoOptional custom schema - if not provided, will be auto-generated from CSV headers

datastore-structured_create_collection_with_template

Create a new datastore with a pre-built template. Templates include schema and sample data to get started quickly. Use datastore-structured_list_templates first to see available options. Returns { id, isStructured, schema } - use the “id” field as collectionId for subsequent operations. Parameters:
ParameterTypeRequiredDefaultDescription
namestringYesDisplay name for the new collection
descriptionstringNoOptional description of the collection purpose
templateIdstringYesTemplate ID from datastore-structured_list_templates (e.g. “customer-orders”, “inventory”, “contacts”). Call datastore-structured_list_templates first to see available options.
createdBystringYesUser ID creating the collection - use the current user ID or a service identifier
createdByNamestringYesDisplay name shown as creator - use the current user name or service name

datastore-structured_create_item

Create a new row (or update if key exists). Call datastore-structured_get_collection first to discover column labels and select options. For “select” type fields, values MUST be one of the allowed options from the schema. Returns { id, key } - use “id” as itemId for get/update/delete operations. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID (not name) to add the item to - e.g. “KCny7nGXpBzWNYpJzC0b”. Use datastore-structured_list_collections tool to get collection ID.
keystringYesUnique identifier key for the row within the collection (required)
contentanyYesContent object (required). Use column labels from the schema as keys (e.g. {“Name”: “John Doe”, “Email”: “john@example.com”}). For “select” type fields, value MUST be one of the allowed options from the schema.
sortFieldstringNoOptional sort field for organizing items
metadataobjectNoOptional metadata object for categorization and organization (e.g. {“customField1”: “Custom attribute 1”, “customField2”: “Custom attribute 2”})
triggerChangesbooleanNotrueWhether to trigger webhooks on change
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

datastore-structured_delete_item

Delete a single row by itemId (recommended) or by key. Using key without sortField deletes ALL items with that key. Prefer itemId for precision. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID (not name) that the item belongs to - e.g. “KCny7nGXpBzWNYpJzC0b”. Use datastore-structured_list_collections tool to get collection ID.
itemIdstringNoItem ID to delete (recommended method - use either itemId or key, not both)
keystringNoItem key to delete (alternative method - use either itemId or key, not both). Key values are URL-encoded automatically.
sortFieldstringNoSort field to delete a specific key+sortField combination (only used with key parameter)
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

datastore-structured_delete_collection

Delete a datastore collection and all its data. Returns { message } on success. WARNING: This is a destructive operation that cannot be undone. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID to delete - e.g. “KCny7nGXpBzWNYpJzC0b”. Use datastore-structured_list_collections tool to get collection ID.

datastore-structured_get_collection

REQUIRED: Get collection schema before any write operations. Returns column labels, field types, and allowed options for select fields. Always call this first to understand the table structure. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID to get details for - e.g. “KCny7nGXpBzWNYpJzC0b”

datastore-structured_get_item

Get a single item (row) by its itemId. Use when you have the specific item ID from a previous operation. Returns full item data (content with field values, metadata, timestamps). For encrypted content, set decryptSecrets=true. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID (not name) that the item belongs to - e.g. “KCny7nGXpBzWNYpJzC0b”. Use datastore-structured_list_collections tool to get collection ID.
itemIdstringYesUnique datastore item ID to retrieve (itemId, not key)
decryptSecretsbooleanNofalseWhether to decrypt secrets if item contains encrypted data
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

datastore-structured_get_item_by_key

Get item(s) by their key. Use when you know the item key but not the itemId. Returns array of all items with matching key, or single item if sortField also provided. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID (not name) that the item belongs to - e.g. “KCny7nGXpBzWNYpJzC0b”
keystringYesUnique key identifier for the item within the collection
sortFieldstringNoOptional sort field to uniquely identify the item when multiple items have the same key
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

datastore-structured_import_data

Import data from a CSV file into an existing datastore. CSV column headers must match schema field labels. Returns { imported, total, failed } with counts. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID of existing datastore - e.g. “KCny7nGXpBzWNYpJzC0b”
fileUrlstringYesURL to the CSV file (e.g. from filestorage, S3, or any publicly accessible URL)

datastore-structured_list_collections

List all available structured datastore collections (tables with schemas). Returns an array of collections, each with { id, name, type, schema }. Use the “id” field as collectionId for subsequent operations. For unstructured data, use the datastore-unstructured server. Parameters: None

datastore-structured_list_items

List/browse items (rows) with pagination and sorting. Returns items with pagination metadata (totalCount, hasNextPage, hasPrevPage). Use format=“full” to include item content, or “light” for metadata only. Supports sorting by any column name (e.g. “Amount:desc”) or system fields (createdAt, updatedAt, key, sortField). Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID (not name) - e.g. “KCny7nGXpBzWNYpJzC0b”. Use datastore-structured_list_collections tool to get collection ID.
limitnumberNo50Maximum number of items to return (default: 50, max: 1000)
offsetnumberNoOffset for pagination (default: 0). Use with limit to page through results. Example: limit=50&offset=50 for page 2.
orderedBystringNo"createdAt:desc"Sorting field and direction - format: “<field>:<asc|desc>“
formatstringNo"light"Response format: “light” for minimal info (id, createdAt, sortField, key, updatedAt), “full” for complete data
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

datastore-structured_list_templates

List available templates for creating datastores. Returns an array of templates, each with { id, name, description, category, schema }. Use the template “id” when calling datastore-structured_create_collection_with_template. Parameters: None

datastore-structured_migrate_sortfield

Change default sort order and regenerate sortField for all items. Long-running (30-60s for large collections). Use when you need to change how items are ordered by default. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID of a datastore - e.g. “KCny7nGXpBzWNYpJzC0b”
sortConfigobjectYesNew sort configuration to apply to all items

datastore-structured_analytics_query

Run analytics on collection data using natural language. Translates questions into BigQuery aggregations (COUNT, SUM, AVG, MIN, MAX), groupings, computed columns, and filtered summaries. Returns dynamic columns and rows — not full datastore items. Use this for questions like “how many rows by status?”, “average salary by department”, “top 10 products by revenue”, “count of items created per month”. For filtering/returning full rows, use datastore-structured_natural_query instead. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID of a structured datastore (must have schema) - e.g. “KCny7nGXpBzWNYpJzC0b”
querystringYesNatural language analytics question - e.g. “how many items per status?”, “average population by continent”, “top 5 countries by GDP”, “count of active vs inactive”, “total revenue by month”
limitnumberNo10000Maximum number of result rows to return (default 10000, max 50000). For aggregations this is usually small.
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

datastore-structured_natural_query

Query data using natural language. Two modes: • “natural-search” — filters and returns matching rows (e.g. “active users from last week”). • “natural-answer” — generates an AI analysis with calculations (e.g. “what is average age?”). PAGINATION (natural-search only): The first call translates your query into SQL via an LLM. The response includes a translation object and pagination metadata. To fetch the next page, pass the SAME translation back (this skips the LLM) and increment offset by your limit. Example — page through 100 items at a time: Page 1: { query: “active users”, mode: “natural-search”, limit: 100 } Page 2: { query: “active users”, mode: “natural-search”, limit: 100, offset: 100, translation: <translation from page 1> } Page 3: { query: “active users”, mode: “natural-search”, limit: 100, offset: 200, translation: <translation from page 1> } Stop when pagination.hasNextPage is false. RETURN ALL (natural-search only): Set returnAll: true to fetch every matching row in one call (up to 50,000 rows). WARNING: The response payload is limited to ~6 MB (AWS Lambda). Wide rows or large text fields may hit this before 50,000. If you get a payload error, switch to paginated mode with a smaller limit. CHOOSING A LIMIT: You control the page size via limit. Pick a value that balances throughput vs. payload size. Common choices: 100-500 for interactive use, 1000-5000 for batch processing, returnAll for workflows needing the full dataset. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID of a datastore (must have schema) - e.g. “KCny7nGXpBzWNYpJzC0b”
querystringYesNatural language query - e.g. “find high priority cases from last week” for search mode, or “what is the average age?” for answer mode
modestringYesQuery mode: “natural-search” returns filtered rows, “natural-answer” returns AI-generated analysis with insights
limitnumberNoPage size — number of items to return per request (default: 1000, max: 50000). Only applies to natural-search mode. Choose based on your use case: 100-500 for interactive browsing, 1000-5000 for batch processing. The response payload is capped at ~6 MB, so very wide rows may require a smaller limit.
offsetnumberNoNumber of items to skip (default: 0). Only applies to natural-search mode. To page through results: set offset = 0 for page 1, offset = limit for page 2, offset = limit * 2 for page 3, etc. Always pass the translation from the first response when using offset > 0 to avoid redundant LLM calls.
returnAllbooleanNoWhen true, fetches ALL matching items in a single call (up to 50,000 rows). Only applies to natural-search mode. Use in workflows when you need the complete result set. WARNING: Response payload is limited to ~6 MB. If rows are wide (many columns, large text), you may hit the payload limit before 50,000 rows. In that case, use paginated mode instead.
translationanyNoCached SQL translation from a previous response. IMPORTANT: When provided, the LLM call is skipped entirely and the query goes straight to BigQuery — this is faster and cheaper. Always pass this on page 2+ to avoid re-translating the same query. Copy the entire translation object from the first page response and send it unchanged.
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

Search rows by text query with fuzzy/exact/prefix matching. Use when you need to find items containing specific text but don’t know their key or ID. Supports field-specific search (content, key, sortField). For structured queries, prefer datastore-structured_natural_query. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID (not name) to search in - e.g. “KCny7nGXpBzWNYpJzC0b”. Use datastore-structured_list_collections tool to get collection ID.
qstringYesSearch query string to find in documents (required). For multi-word queries, words must be adjacent in the source text (phrase-based search). Example: “quick brown” matches “The quick brown fox” but “quick fox” won’t match if words are separated.
fieldstringNo"all"Field to search: “all” for comprehensive search, “content” for main item content, “key” for primary identifier, “sortField” for secondary identifier.
typestringNo"fuzzy"Search type: “fuzzy” (default - handles typos), “exact” (precise matches), “prefix” (starts with)
thresholdnumberNo0.3Fuzzy matching sensitivity from 0.0 (strict) to 1.0 (lenient), default: 0.3
limitnumberNo50Maximum number of results to return (default: 50, max: 1000)
compiledbooleanNofalseOutput format: false (default - JSON with snippets & scores), true (plain text with full content, RAG-like)
queryParamsobjectNo{}Pre-filter by document fields using “content.” or “metadata.” keys (e.g. {“metadata.category”: “work”})
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

datastore-structured_update_item

Update an existing row by itemId (partial update). Provide only the fields you want to change - other fields remain unchanged. For “select” type fields, values MUST match one of the allowed options from the schema. Requires itemId (from create/list/get operations). Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID (not name) that the item belongs to - e.g. “KCny7nGXpBzWNYpJzC0b”. Use datastore-structured_list_collections tool to get collection ID.
itemIdstringYesItem ID to update (itemId not the key). Can be obtained when creating the item or by listing/getting/searching items. Required for updates.
contentanyYesUpdated content object (required). Use column labels from the schema as keys (e.g. {“Status”: “Closed”}). Only provided fields are updated; others remain unchanged. For “select” type fields, value MUST be one of the allowed options from the schema.
metadataobjectNoOptional updated metadata object with key-value pairs. Only provided metadata fields are updated; original key and sortField are preserved.
triggerChangesbooleanNotrueWhether to trigger webhooks on change
proxyIdstringNoProxy ID to access a shared datastore collection. Requires X-API-Key header.

datastore-structured_update_schema

Modify schema to add/remove/rename columns. Field IDs (f_1, f_2) remain stable when renaming. Must provide complete schema with all fields. Parameters:
ParameterTypeRequiredDefaultDescription
collectionIdstringYesCollection ID to update schema for - e.g. “KCny7nGXpBzWNYpJzC0b”. Use datastore-structured_list_collections to find the collection ID.
schemaobjectYesComplete schema object with all fields. WORKFLOW: 1) Call datastore-structured_get_collection to get current schema, 2) Modify the fields array (add/remove/rename fields), 3) Update nextFieldId if adding fields, 4) Provide the complete modified schema. IMPORTANT: Include ALL existing fields plus any new ones - this replaces the entire schema.