create_document
Add a new document to a specified collection in Typesense, ensuring it includes required fields like 'id' unless using auto-schema. Simplify document creation for structured data storage and retrieval.
Instructions
Creates a single new document in a specific collection.
Args:
ctx (Context): The MCP context.
collection_name (str): The name of the collection.
document (dict): The document data to create (must include an 'id' field unless auto-schema).
Returns:
dict | str: The created document dictionary or an error message string.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"collection_name": "<collection_name>",
"document": "<document>"
},
"name": "create_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_name | Yes | ||
| document | Yes |