Skip to main content
Glama
Dinesh-Satram

Health & Fitness Coach MCP

feedback-logger.ts•1.5 kB
import { z } from "zod"; import { memoryStore } from "../utils/memoryStore"; import { FeedbackEntry } from "../types/entries"; export const feedbackLoggerTool = { name: "log-feedback", description: "Log feedback about your fitness journey, how you're feeling, or notes about workouts/nutrition", schema: { userId: z.string().describe("Unique user identifier"), date: z.string().describe("Date of the feedback (YYYY-MM-DD format)"), notes: z.string().describe("Your feedback, notes, or how you're feeling about your fitness journey"), }, handler: async ({ userId, date, notes }: { userId: string; date: string; notes: string; }) => { try { const feedbackEntry: FeedbackEntry = { date, notes, }; memoryStore.addEntry(userId, feedbackEntry); return { content: [ { type: "text" as const, text: `💭 Feedback logged successfully! **Feedback Details:** - Date: ${date} - Notes: ${notes} Thank you for sharing your thoughts! This feedback will help generate better personalized recommendations and track your progress over time.`, }, ], }; } catch (error) { console.error('Error logging feedback:', error); return { content: [ { type: "text" as const, text: `❌ Error logging feedback: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } }, };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dinesh-Satram/fitness_coach_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server