Typesense MCP Server

by avarant
Verified

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.

Input Schema

NameRequiredDescriptionDefault
collection_nameYes
documentYes

Input Schema (JSON Schema)

{ "properties": { "collection_name": { "title": "Collection Name", "type": "string" }, "document": { "additionalProperties": true, "title": "Document", "type": "object" } }, "required": [ "collection_name", "document" ], "title": "create_documentArguments", "type": "object" }
ID: hgixq30f32