save_token
Store your Kinde authentication token to enable persistent access to your todo management system and maintain session continuity across interactions.
Instructions
Save your Kinde authentication token for future use
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Your Kinde JWT token |
Implementation Reference
- src/server.ts:406-425 (handler)Main handler for the 'save_token' tool call within the CallToolRequestHandler switch statement. Validates the input arguments, extracts the token, calls the saveToken helper to persist it, and returns a success message.case 'save_token': { const validation = validateArgs(args, ['token']); if (!validation.valid) { return { content: [{ type: 'text', text: `Error: ${validation.error}` }], }; } const token = validation.validatedArgs!.token as string; saveToken(token); return { content: [ { type: 'text', text: `✅ Token saved successfully! You can now use commands like "list todos" and "create todo" without providing the token each time.`, }, ], }; }
- src/server.ts:232-241 (schema)Input schema definition for the 'save_token' tool, specifying an object with a required 'token' string property.inputSchema: { type: 'object', properties: { token: { type: 'string', description: 'Your Kinde JWT token', }, }, required: ['token'], },
- src/server.ts:229-242 (registration)Registration of the 'save_token' tool in the ListToolsRequestHandler response, including name, description, and input schema.{ name: 'save_token', description: 'Save your Kinde authentication token for future use', inputSchema: { type: 'object', properties: { token: { type: 'string', description: 'Your Kinde JWT token', }, }, required: ['token'], }, },
- src/server.ts:22-24 (helper)Helper function that implements the core logic of saving the authentication token to a file using writeFileSync.function saveToken(token: string) { writeFileSync(TOKEN_FILE, token); }