Skip to main content
Glama

add_set

Add a set to an existing exercise in the MCP Logger fitness tracker, specifying reps, weight, distance, duration, side, RPE, RIR, and warmup status for comprehensive workout logging.

Instructions

Add a set to an existing exercise.

Args: exercise_id: ID of the exercise to add set to reps: Number of repetitions weight_kg: Weight in kilograms weight_lbs: Weight in pounds distance_m: Distance in meters distance_yards: Distance in yards duration_s: Duration in seconds side: 'left', 'right', or 'both' for unilateral exercises rpe: Rate of Perceived Exertion (1-10) rir: Reps In Reserve (0-5) is_warmup: Whether this is a warmup set

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exercise_idYes
repsNo
weight_kgNo
weight_lbsNo
distance_mNo
distance_yardsNo
duration_sNo
sideNo
rpeNo
rirNo
is_warmupNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `add_set` tool is defined here, which registers with the FastMCP app and handles inserting a new set into the database for a given `exercise_id`.
    def add_set(
        exercise_id: int,
        reps: Optional[float] = None,
        weight_kg: Optional[float] = None,
        weight_lbs: Optional[float] = None,
        distance_m: Optional[float] = None,
        distance_yards: Optional[float] = None,
        duration_s: Optional[float] = None,
        side: Optional[str] = None,
        rpe: Optional[float] = None,
        rir: Optional[float] = None,
        is_warmup: bool = False,
    ) -> dict[str, int]:
        """Add a set to an existing exercise.
        
        Args:
            exercise_id: ID of the exercise to add set to
            reps: Number of repetitions
            weight_kg: Weight in kilograms
            weight_lbs: Weight in pounds
            distance_m: Distance in meters
            distance_yards: Distance in yards
            duration_s: Duration in seconds
            side: 'left', 'right', or 'both' for unilateral exercises
            rpe: Rate of Perceived Exertion (1-10)
            rir: Reps In Reserve (0-5)
            is_warmup: Whether this is a warmup set
        """
        conn = get_connection()
        cursor = conn.cursor()
        
        # Get current max set_index
        cursor.execute("SELECT COALESCE(MAX(set_index), 0) FROM sets WHERE exercise_id = ?", (exercise_id,))
        max_set = cursor.fetchone()[0]
        
        cursor.execute(
            """INSERT INTO sets (
                exercise_id, set_index, reps, weight_kg, weight_lbs,
                distance_m, distance_yards, duration_s, side, rpe, rir, is_warmup
            ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
            (
                exercise_id, max_set + 1, reps, weight_kg, weight_lbs,
                distance_m, distance_yards, duration_s, side, rpe, rir, 1 if is_warmup else 0
            ),
        )
        set_id = cursor.lastrowid
        conn.commit()
        conn.close()
        return {"set_id": set_id}
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Add' implies a write/mutation operation, the description doesn't address critical behavioral aspects like required permissions, whether this operation is idempotent, what happens on failure, or what the output contains. The parameter documentation provides some context but doesn't cover overall tool behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear purpose statement followed by well-organized parameter explanations. Each parameter gets exactly one line with essential semantic information. There's no wasted verbiage, though the opening sentence could be slightly more informative about the tool's broader context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 11 parameters and no annotations, the description does a reasonable job explaining parameters but lacks broader context. The presence of an output schema means return values are documented elsewhere, but the description should still address behavioral aspects like error conditions, side effects, or typical usage patterns given the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well by providing clear semantic explanations for all 11 parameters. Each parameter gets a brief but meaningful explanation that adds value beyond the schema's type information (e.g., explaining what 'rpe' and 'rir' mean, clarifying side options, defining measurement units). This significantly enhances parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Add') and resource ('a set to an existing exercise'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'add_exercise' or 'log_workout', which would require more specific context about when to use each.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'add_exercise' or 'log_workout'. It mentions adding to 'an existing exercise' but doesn't specify prerequisites, dependencies, or contextual constraints that would help an agent choose between similar tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/JohnZolton/MCP-logger'

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