create_collection
Creates a new collection in Typesense databases by defining a schema with required fields and name, enabling structured data storage and search functionality.
Instructions
Creates a new collection with the provided schema.
Args:
ctx (Context): The MCP context.
schema (dict): The collection schema dictionary (must include 'name' and 'fields').
Returns:
dict | str: The created collection schema 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": {
"schema": "<schema>"
},
"name": "create_collection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | Yes |