Skip to main content
Glama

Add goal widget

add_goal_widget

Add a Goal widget to a page: a progress gauge showing a demo target until it points at a saved goal. Returns the new widget_id — configure it with update_data_widget, passing advanced.goal_id from list_goals. The goal carries its own metric query, target and comparison, so the widget needs no metrics or dimensions. Position, width and height match the editor's Goal card.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYesPage ID the widget will be placed on, from list_pages.
client_idYesClient ID the report belongs to (from list_clients).
source_idYesReport ID the widget belongs to (from list_reports).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoThe goal widget, still on a demo target until a goal is picked, that was added — widget_id, plus the stored row with the defaults the server filled in (position, width, height).
successYesTrue when the call succeeded. A failure comes back as an error result instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": {},
      +      "description": "The goal widget, still on a demo target until a goal is picked, that was added — widget_id, plus the stored row with the defaults the server filled in (position, width, height).",
      +      "type": "object"
      +    },
      +    "success": {
      +      "description": "True when the call succeeded. A failure comes back as an error result instead.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

The description discloses key behaviors beyond the annotations: the widget initially displays a demo target, returns a widget_id for later configuration, inherits goal-defined metric/query/target/comparison settings, and matches the editor's Goal card dimensions. It does not mention permissions or reversal, but the annotations already indicate a non-read-only, non-destructive operation and the description adds meaningful behavioral context.

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?

Three sentences deliver the core action, return value, configuration path, and the widget's distinguishing behavior with no redundancy. The most important operational details are front-loaded.

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?

For a widget-creation tool with full schema coverage and an output schema, the description covers the full lifecycle: what the widget is, what it returns, how to configure it, why it needs no metrics/dimensions, and how its layout behaves. Nothing essential is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so each parameter (page_id, client_id, source_id) is already documented with source references. The description adds workflow context but no additional parameter-specific semantics, so the baseline score of 3 is appropriate.

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 identifies the tool's action and resource: adding a Goal widget to a page, specifically a progress gauge that shows a demo target until linked to a saved goal. It also distinguishes it from sibling add_*_widget tools by referencing the goal's self-contained metric query, target, and comparison.

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?

The description gives actionable guidance: after adding, configure the widget via update_data_widget with advanced.goal_id from list_goals, and notes that no metrics or dimensions need to be passed. It does not explicitly contrast with alternatives like add_data_widget or add_calculated_metric_widget, but the use case is specific and clear enough.

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.

Resources