create_collection_item
Add a new item to a specified collection by providing collection name and item data.
Instructions
Crée un nouvel item dans une collection
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": "<collection>",
"data": "<data>"
},
"name": "create_collection_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | Yes | Nom de la collection | |
| data | Yes | Données de l'item à créer |
Implementation Reference
- src/tools.ts:88-105 (registration)Tool registration with name 'create_collection_item' and input schema requiring 'collection' (string) and 'data' (object)
{ name: "create_collection_item", description: "Crée un nouvel item dans une collection", inputSchema: { type: "object", properties: { collection: { type: "string", description: "Nom de la collection", }, data: { type: "object", description: "Données de l'item à créer", }, }, required: ["collection", "data"], }, }, - src/index.ts:84-91 (handler)Handler case that extracts 'collection' and 'data' from args and calls skema.createItem(collection, data)
case "create_collection_item": { const { collection, data } = args as { collection: string; data: Record<string, unknown>; }; result = await skema.createItem(collection, data); break; } - src/skema-client.ts:118-119 (helper)Helper function createItem that calls mcpCall('create_collection_item', { collection, data }) to send the JSON-RPC request to the Skema API
export const createItem = (collection: string, data: Record<string, unknown>) => mcpCall("create_collection_item", { collection, data });