@fredrika/mcp-mochi 2.1.0 → 2.3.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.
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ const CreateCardRequestSchema = z.object({
|
|
|
34
34
|
content: z
|
|
35
35
|
.string()
|
|
36
36
|
.min(1)
|
|
37
|
-
.describe("Markdown content of the card. Separate the question and answer with a horizontal rule surrounded by newlines: '\\n---\\n'"),
|
|
37
|
+
.describe("Markdown content of the card. Separate the question and answer with a horizontal rule (3 dashes) surrounded by newlines: '\\n---\\n'. IMPORTANT: the dashes must be on an empty line."),
|
|
38
38
|
deckId: z.string().min(1).describe("ID of the deck to create the card in"),
|
|
39
39
|
templateId: z
|
|
40
40
|
.string()
|
|
@@ -277,9 +277,9 @@ const GetDueCardsResponseSchema = z.object({
|
|
|
277
277
|
cards: z.array(DueCardSchema).describe("Array of cards due for review"),
|
|
278
278
|
});
|
|
279
279
|
function getApiKey() {
|
|
280
|
-
const apiKey = process.env.
|
|
280
|
+
const apiKey = process.env.MOCHI_API_KEY;
|
|
281
281
|
if (!apiKey) {
|
|
282
|
-
console.error("
|
|
282
|
+
console.error("MOCHI_API_KEY environment variable is not set");
|
|
283
283
|
process.exit(1);
|
|
284
284
|
}
|
|
285
285
|
return apiKey;
|
|
@@ -540,7 +540,7 @@ function formatToolError(error) {
|
|
|
540
540
|
// Note: Using type assertions due to Zod version compatibility between SDK (v4) and project (v3)
|
|
541
541
|
server.registerTool("create_flashcard", {
|
|
542
542
|
title: "Create flashcard on Mochi",
|
|
543
|
-
description: "Create a new flashcard in Mochi. Look up deckId with list_decks first. Use create_card_from_template if the deck has a template-id defined.",
|
|
543
|
+
description: "Create a new flashcard in Mochi. Look up deckId with list_decks first. Use create_card_from_template if the deck has a template-id defined. IMPORTANT: To add images/audio/files: 1) Create the card (include placeholder with id like '' in content), 2) Use add_attachment with the returned card ID to upload the file with the matching id.",
|
|
544
544
|
inputSchema: CreateCardRequestSchema,
|
|
545
545
|
outputSchema: CreateCardResponseSchema,
|
|
546
546
|
annotations: {
|
|
@@ -666,7 +666,7 @@ server.registerTool("archive_flashcard", {
|
|
|
666
666
|
});
|
|
667
667
|
server.registerTool("add_attachment", {
|
|
668
668
|
title: "Add attachment to flashcard on Mochi",
|
|
669
|
-
description: "
|
|
669
|
+
description: "Upload an attachment (image, audio, etc.) to an EXISTING card using base64 data. The card content must already include the markdown reference '' where filename matches the uploaded file. Workflow: 1) Create card with create_flashcard (include '' in content), 2) Upload file with this tool using the card ID and matching filename. For URL-based images, just use standard markdown in card content instead.",
|
|
670
670
|
inputSchema: AddAttachmentSchema,
|
|
671
671
|
outputSchema: AddAttachmentResponseSchema,
|
|
672
672
|
annotations: {
|