Skip to main content
Glama

get_goals

Retrieve active goals including step, activity, and weight goals, along with their current progress.

Instructions

Get active goals: step goals, activity goals, weight goals, and their progress

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'get_goals' tool with the MCP server, including description and handler that calls client.getGoals().
    server.registerTool(
      'get_goals',
      {
        description: 'Get active goals: step goals, activity goals, weight goals, and their progress',
      },
      async () => {
        const data = await client.getGoals();
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Handler implementation of getGoals() which fetches goals from the Garmin API with pagination, using the GOALS_ENDPOINT and DEFAULT_GOALS_STATUS/DEFAULT_GOALS_LIMIT constants.
    async getGoals(status = DEFAULT_GOALS_STATUS): Promise<unknown> {
      const allGoals: unknown[] = [];
      let start = 0;
    
      while (true) {
        const page = await this.request<unknown[]>(
          `${GOALS_ENDPOINT}?status=${status}&start=${start}&limit=${DEFAULT_GOALS_LIMIT}&sortOrder=asc`,
        );
    
        if (!Array.isArray(page) || page.length === 0) break;
    
        allGoals.push(...page);
    
        if (page.length < DEFAULT_GOALS_LIMIT) break;
    
        start += DEFAULT_GOALS_LIMIT;
      }
    
      return allGoals;
    }
  • Endpoint constant GOALS_ENDPOINT = '/goal-service/goal/goals' used by the handler.
    export const GOALS_ENDPOINT = '/goal-service/goal/goals';
  • Default status filter constant DEFAULT_GOALS_STATUS = 'active' used by the handler.
    export const DEFAULT_GOALS_STATUS = 'active';
  • Pagination limit constant DEFAULT_GOALS_LIMIT = 100 used by the handler.
    export const DEFAULT_GOALS_LIMIT = 100;
Behavior3/5

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

No annotations are provided, so the description must convey behavioral traits. It implies a read operation ('Get') but does not explain pagination, rate limits, or response format. Basic but not misleading.

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?

Single sentence front-loading key information: action, resource, and specifics. Every word earns its place; no fluff.

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?

Given no output schema and no annotations, the description should more fully specify what is returned. It mentions goals and progress but does not describe the structure or any limitations. Adequate for a simple tool but incomplete.

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?

No parameters exist in the input schema (0 params). Per guidelines, baseline is 4. The description does not need to add parameter info, but it correctly implies no inputs required.

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 description clearly states it retrieves active goals, listing specific types (step, activity, weight) and mentions progress. This distinguishes it from many sibling get_* tools that focus on other data (e.g., get_activities, get_steps).

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?

No guidance on when to use this tool versus alternatives, no prerequisites or exclusions mentioned. The description simply states what it does without context for decision-making.

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/Nicolasvegam/garmin-connect-mcp'

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