Skip to content

Public API does not support input_modifier field — rep ranges created via MCP appear blank in app #261

Description

@iliassk

Hi 👋

I'm using the MCP tools (create-routine, update-routine) to programmatically build routines with rep ranges. After creating them, I noticed that rep ranges don't display in the Hevy app — I see blank REPS columns instead of
the REP RANGE column, even though rep_range values are correctly set on each set.

Root Cause

After investigating, I found that the public API rejects the input_modifier field:

PUT /v1/routines/{id}
Body: { "routine": { "exercises": [{ "input_modifier": "rep-range", ... }] } }

Response:

{"error": "\"routine.exercises[0].input_modifier\" is not allowed"}

I intercepted the Hevy web app's requests via DevTools and discovered that the internal API (PUT /routine/{id}) uses an input_modifier: "rep-range" field on each exercise to toggle between REPS and REP RANGE display modes. Without
it, the app defaults to REPS mode and my rep range values are invisible.

Impact

Any routine created through the MCP tools that uses rep ranges will appear to have blank rep fields in the app. The data is stored correctly server-side, but the UI won't render it because input_modifier was never set. I had to go
back and patch all 20 of my routines via the internal API to fix this.

Expected Behavior

Ideally one of:

  1. The public API accepts input_modifier: "rep-range" on exercises
  2. The API automatically infers input_modifier: "rep-range" when rep_range is set on any set
  3. The MCP tool handles this transparently

Workaround

I'm currently working around this by using the internal Hevy web API directly via curl after creating routines through MCP:

Some other differences I noticed between the internal and public API formats:

  • Internal uses indicator instead of type for set types (warmup/normal/failure/dropset)
  • Internal requires index on each set
  • Internal auth uses Bearer session token + x-api-key: shelobs_hevy_web

Steps to Reproduce

  1. Create a routine via the MCP create-routine tool with sets that have rep_range values
  2. Open the routine in the Hevy app
  3. Observe that the REPS column is shown (not REP RANGE) and values appear blank
  4. Edit the same routine from the Hevy web UI, add input_modifier: "rep-range" via the internal API
  5. Observe that rep ranges now display correctly

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions