We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2370cd commit c7a0037Copy full SHA for c7a0037
packages/mcp/src/tools/create-card.ts
@@ -23,6 +23,17 @@ export async function handleCreateCard(
23
try {
24
// Validate input and log start
25
const validatedInput = CreateCardInputSchema.parse(input);
26
+
27
+ // Fix: Claude Code's MCP client sends data as a JSON string instead of an object
28
+ // Parse it if it's a string
29
+ if (typeof validatedInput.data === 'string') {
30
+ try {
31
+ validatedInput.data = JSON.parse(validatedInput.data);
32
+ } catch (e) {
33
+ throw new Error(`Invalid JSON in data parameter: ${e instanceof Error ? e.message : String(e)}`);
34
+ }
35
36
37
logToolStart(TOOL_NAME, validatedInput);
38
39
// Get course config to validate datashape
0 commit comments