Skip to main content
Glama

Add or update a goal

upsert_goal
Destructive

Create or update a training goal (pass id to update). target.goal_type selects the shape: milestone (point target — exercise_id+value, or bodyweight+baseline_value), weekly_volume (muscle+band: mev|mev_mav|mav — "train X at least at MEV every week"), trend (exercise_id+metric, no value — "just keep it climbing", no fixed finish line), maintenance (baseline_value+tolerance_pct, exercise_id and/or muscle optional, unset means total session volume — "don't lose ground"), or omit goal_type for a plain process goal (metric=sessions_per_week).

Any exercise_id must be an id from the user's catalog (list_exercises; new ones via upsert_exercise): unknown ids are rejected, and a synonymous duplicate would split the exercise's history. review_date is the goal's scheduled check-in date.

featured=true makes this the ONE goal on the app's featured-goal card and automatically un-features any other active goal. The server rejects featured on a frequency goal; those live in the adherence widget only.

Goal succession is two records: the earlier goal with status=achieved (never featured, which the server enforces) and the next goal with supersedes_goal_id=<earlier goal's id>. The app never transitions a goal on its own.

Coach-proposed goals carry ratified=false until the user agrees. Goals are not deleted: status=revised/abandoned/achieved supersedes them, so history survives.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructive/non-idempotent, but the description adds substantial non-obvious behavior: featured=true auto-un-features other active goals, server rejects featured on frequency goals, goals are never deleted (status supersedes them), succession is two linked records, and the app never transitions goals on its own. This is exactly the extra context annotations cannot carry.

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?

Front-loads the create/update rule and the goal_type taxonomy before deeper domain rules; every paragraph carries information. It is dense and occasionally parenthetical-heavy, but for a deeply nested schema the length is defensible rather than padded.

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

Completeness5/5

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

Given a 1-param nested object with low schema coverage and an output schema present, the description covers the create/update mechanics, the goal_type matrix, validation constraints, succession, and featured/ratification rules. An agent has everything needed to call it correctly.

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

Parameters5/5

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

Top-level schema description coverage is ~0% (only goal_type/band have inline docs), so the description must compensate and does: it enumerates each goal_type shape with its required fields (e.g. maintenance=baseline_value+tolerance_pct, trend=exercise_id+metric no value), explains review_date, supersedes_goal_id, ratified, and the featured flag.

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

Purpose5/5

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

States a specific verb+resource and immediately disambiguates create vs update with the `id` convention: 'Create or update a training goal (pass `id` to update)'. It then maps the full shape space of target.goal_type, letting an agent distinguish this from siblings like upsert_exercise and get_goals without opening any schema.

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

Usage Guidelines4/5

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

Gives clear contextual routing: pass `id` to update, source=new exercise ids come via upsert_exercise, list_exercises is the catalog source, and featured is rejected for frequency goals. It does not explicitly state when NOT to use this tool (e.g. use get_goals to read), so it stops short of the top band.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.