Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TRAINHEROIC_EMAILNoEmail address for TrainHeroic account (used with password)
TRAINHEROIC_PASSWORDNoPassword for TrainHeroic account
TRAINHEROIC_SESSION_TOKENNoSession token obtained from browser DevTools

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_user_profileA

Get the current user's profile (name, ID, coach status, etc.).

get_team_infoA

Get the athlete's team memberships and license info (team IDs, program IDs, coaches).

get_workout_historyA

Get workout history for a date range.

Dates must be YYYY-MM-DD. If omitted, defaults to the last weeks_back weeks. Fetches one day at a time to guarantee the full day's data is returned.

By default (include_sets=False) each item is projected to a flat summary: id, workout_id, program_id, date, workout_title, feed_item_id, saved_workout_id, completed, workout_rating, rpe, notes. Use this for scanning history and finding sessions — it's intentionally small.

Set include_sets=True only when you need set-level exercise data AND you are querying a narrow range (1-3 days). For full set data on a single known session, prefer get_workout_details(program_workout_id, program_id) instead.

Set cache_bust=True to force a fresh API fetch for every day in the range, ignoring and overwriting any cached data regardless of TTL.

get_workout_detailsA

Get workout details for a specific program workout: exercises, prescribed vs. logged sets, and coaching notes.

Pass the program_workout_id from get_workout_history. To ensure the correct team is used, also pass program_id (the program_id field from the get_workout_history item) — the server will resolve the matching team automatically. Alternatively, pass team_id directly. Falls back to the user's primary team if neither is given.

slim=True (the DEFAULT, and safe for small/local context windows) removes the duplicated saved_workout_set_exercises array, per-exercise media (tips/video_url), and the empty per-set param_N_* value slots. Each exercise is left with its title, abr (prescribed, e.g. "3 x 10 @ 60 lb"), abr_results (actual), and completed flags. Coaching/description text is kept but truncated to max_text_chars. The raw response can exceed 200k characters per session, so keep slim on unless you specifically need the full per-set logged values.

slim=False returns the full response (media fields still stripped). For the full per-set data of a SINGLE exercise without the whole session, use get_exercise_detail(program_workout_id, exercise_id) instead.

get_exercise_detailA

Get the full, un-slimmed per-set data for ONE exercise within a workout.

Use this after a slim get_workout_details call when you need every logged set (all param_N_* values, prescribed vs. actual) for a specific exercise, without pulling the entire session. Reuses the cached workout-details response.

Pass the exercise_id shown in the slim get_workout_details response, plus the same program_id/team_id you used there so the correct team is resolved.

get_exercise_statsB

Get stats for an exercise: last performance, personal record, and working max.

stat_date is YYYY-MM-DD and defaults to today. Response includes isLift, lastPerformance (text, date, notes), personalRecord, and workingMax.

get_personal_recordsB

Get all personal records for an exercise, broken down by rep count.

Each entry contains reps, weight, scaledWeight, units, and setNumber.

get_working_maxB

Get the current working max for a specific exercise.

Response: {value, hasReferenceMaxExercise, referenceMaxExercise}

get_exercise_libraryB

Get the full exercise library for a team.

Optionally filter by name with query (case-insensitive substring match). Each exercise has id, title, prescription, param1Type, param2Type, videoUrl, hasVideo.

get_circuit_libraryB

Get the circuit library for a team.

Each circuit has id, title, instructions, prescription, and exerciseIds.

get_recent_exercisesA

Get the user's recently used exercises.

get_recent_circuitsA

Get the user's recently used circuits.

create_personal_sessionA

Create a new personal training session for a given date (YYYY-MM-DD).

Returns {programWorkout: {id, programId, date, workoutId}, savedWorkout: {id}}. Use the returned workoutId with add_exercises_to_session and savedWorkout.id with log_workout.

add_exercises_to_sessionA

Add exercises to a personal workout session in order.

exercise_ids: ordered list of exercise IDs to add (use get_exercise_library to look up IDs). Returns the created workout sets with full exercise details.

log_workoutB

Save/log a completed workout with results.

saved_workout_id: from create_personal_session or get_workout_details. workout_id: the workout's workoutId. date_string: YYYY-MM-DD date of the session. blocks: list of block/set IDs that were completed. rpe: Rate of Perceived Exertion (1-10). workout_rating: numeric rating as string e.g. "8.0".

delete_sessionB

Delete a program workout / personal session by its ID.

get_workout_surveysA

Get pre/post workout surveys for one or more saved workout IDs.

Returns a map of savedWorkoutId → survey data with Sleep, Mood, Energy, Soreness, Stress questions.

submit_surveyA

Submit a readiness/recovery survey answer for a workout.

Question IDs: 8=Sleep, 9=Mood, 10=Energy, 11=Soreness, 12=Stress Answer IDs: 1=Awful/VeryPoor, 2=Poor, 3=Ok, 4=Good, 5=Excellent

get_workout_messagesA

Get the messaging stream and all comments for a workout.

Returns {stream: {id, title, lastActivity, ...}, comments: [...]} where each comment has content, authorName, replies, and reactions.

get_workout_leaderboardB

Get the leaderboard for a specific program workout.

Returns {workoutId, workoutTitle, date, tests, results, testStats, userResult}.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/cmagorian/trainheroicMcp'

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