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 (check list_exercises; create via upsert_exercise first if genuinely new) — unknown ids are rejected, and a synonymous duplicate would split the exercise's history. Set review_date on every ratified goal (~4 weeks out, or the deadline if sooner) so check-ins have an anchor; calibrate milestone targets ~5-10% beyond the user's current number for an 8-12 week horizon.

Set featured=true on the ONE goal that should be the user's single featured goal in the app — this automatically un-features any other active goal. Never set featured on a frequency goal (the server rejects it); those live in the adherence widget only, never the featured-goal card.

When a milestone looks achieved, don't silently transition it — tell the user and ask whether to keep maintaining that level or set a new target, then call upsert_goal twice: mark the old goal status=achieved (also set featured=false, though the server defends this too) and create the new goal with supersedes_goal_id=<old goal's id> and featured=true. This is a decision the user makes with you in conversation, never something the app decides on its own.

Coach-proposed goals carry ratified=false until the user explicitly agrees. Never delete goals — supersede with status=revised/abandoned/achieved 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.9/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description reveals that setting featured=true automatically un-features other active goals, that the server rejects featured on frequency goals, that unknown exercise_ids are rejected, that coach-proposed goals start with ratified=false, and that goals are never deleted but superseded. This is rich behavioral context the annotations alone cannot provide.

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

Conciseness5/5

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

The description is long but proportionately so for a tool with a deeply nested goal object and multiple workflow rules. It is front-loaded with the core operation, then systematically covers each goal type, validation constraints, featured behavior, and lifecycle transitions. Each paragraph earns its place with non-redundant, actionable guidance.

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

Completeness4/5

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

The description covers nearly every meaningful field and behavior, and the output schema exempts it from explaining return values. However, the required 'kind' enum (outcome/process/performance) is never explained and has no schema description (coverage 0%). While goal_type is thoroughly handled, the distinct concept of 'kind' remains underdocumented, leaving a gap for agents that must populate this required field 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?

With schema description coverage at 0%, the description fully compensates by explaining the semantic meaning of goal_type values (milestone, weekly_volume, trend, maintenance, plain process), their required nested fields (e.g., muscle+band for weekly_volume, baseline_value+tolerance_pct for maintenance), and the roles of id, featured, status, ratified, review_date, and supersedes_goal_id. The raw schema only lists enums and null types, so the description adds decisive value.

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?

The opening sentence 'Create or update a training goal (pass `id` to update)' names a specific verb, resource, and the key update selector. It also enumerates all goal_type variants and their field requirements, making the tool's purpose unmistakable and clearly distinct from sibling tools like upsert_exercise and get_goals.

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

Usage Guidelines5/5

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

The description gives explicit operational guidance: when to update (`pass id`), when to check list_exercises and use upsert_exercise for new exercises, when to avoid featured (frequency goals), and the required two-call workflow for achieved milestones. It also states the hard rule 'Never delete goals — supersede with status=revised/abandoned/achieved', leaving no ambiguity about appropriate use.

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.