Skip to main content
Glama

set_goal

Destructive

Create, change or remove a monitoring goal (Monitoring → Goals), validated exactly as the app validates one. create needs clientId, label, metric and target (period defaults to month; lowerIsBetter defaults to the metric's own direction: true for CPA and Cost per lead, false for the rest). update changes any of label, metric, target, lowerIsBetter and period on an existing goal; a new metric or period clears its current value until it is computed again. remove deletes the goal for good and, as in the app, only owners and admins may do it. Requires MCP write actions; without confirm:true it returns a preview and changes nothing.

Input Schema

NameRequiredDescriptionDefault
labelNoThe goal's name, e.g. "Q4 ROAS".
actionYescreate a goal, update one, or remove one.
goalIdNoupdate / remove: the goal (id from get_goals).
metricNoThe paid-ads metric the goal tracks.
periodNomonth, quarter or year — measured to date.
targetNoThe target value, above 0, in the metric's own unit (ROAS 4 = 4×, CTR 2.5 = 2.5 %, money in the ad account's currency).
confirmNoSet true to apply. Omit for a preview. With confirm:true, also pass the preview's previewToken.
clientIdNocreate: the client the goal belongs to (from list_clients).
previewTokenNoWith confirm:true: the previewToken from this tool's preview (valid 15 minutes, once, for exactly the previewed arguments).
lowerIsBetterNoOmit to use the metric's own direction (lower is better for CPA and Cost per lead). On update, a new metric resets it to that metric's direction unless given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the two-step preview/confirm flow, the single-use 15-minute previewToken, the owner/admin permission gate on remove, and the side effect that changing metric or period clears the current value until recomputed. All of this is consistent with destructiveHint=true and readOnlyHint=false, so there is no contradiction.

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?

Purpose is front-loaded and the action clauses are logically ordered (create → update → remove → confirm/permissions). It is a dense single paragraph, but every clause carries real information; the only minor cost is that the confirm/preview mechanics are buried at the end rather than flagged early.

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 10-parameter, three-action mutation tool with no output schema, the description covers required inputs, defaults, side effects, permission requirements, and the dry-run/apply protocol. An agent has everything needed to call it correctly on the first attempt.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: period defaults to month, lowerIsBetter defaults to the metric's own direction (true only for CPA and Cost per lead), and a new metric on update resets lowerIsBetter. It also explains the confirm/previewToken pairing more fully than the individual field descriptions.

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?

Opens with a specific verb+resource ('Create, change or remove a monitoring goal') and immediately unpacks each action (create/update/remove) with its own semantics. It also implicitly positions itself against the read sibling by pointing to get_goals for the goalId, so an agent can distinguish set_goal from get_goals without opening a schema.

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?

Gives per-action guidance: create requires clientId/label/metric/target, update touches label/metric/target/lowerIsBetter/period, remove is permanent and restricted to owners/admins. It also states the preview-vs-apply condition (confirm:true) explicitly, leaving nothing to inference.

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