@fredrika/mcp-mochi 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +7 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -131,7 +131,6 @@ function toMochiCreateCardRequest(params) {
131
131
  "deck-id": params.deckId,
132
132
  "template-id": params.templateId,
133
133
  "manual-tags": params.tags,
134
- fields: params.fields,
135
134
  };
136
135
  }
137
136
  function toMochiUpdateCardRequest(params) {
@@ -392,13 +391,15 @@ export class MochiClient {
392
391
  }
393
392
  // Build content from field values (joined with separator for multi-field templates)
394
393
  const content = fieldValues.join("\n---\n");
395
- const createRequest = {
394
+ const mochiRequest = {
396
395
  content,
397
- deckId: request.deckId,
398
- templateId: request.templateId,
399
- tags: request.tags,
396
+ "deck-id": request.deckId,
397
+ "template-id": request.templateId,
398
+ "manual-tags": request.tags,
399
+ fields,
400
400
  };
401
- return this.createCard(createRequest);
401
+ const response = await this.api.post("/cards", mochiRequest);
402
+ return CreateCardResponseSchema.parse(response.data);
402
403
  }
403
404
  async deleteCard(cardId) {
404
405
  await this.api.delete(`/cards/${cardId}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fredrika/mcp-mochi",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "MCP server for Mochi flashcard integration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",