Skip to main content
Glama

Render a category trend

well_render_category_trend
Read-only

Put a month-by-month trend with one line per category onto the category-trend card.

This tool measures nothing. Pass a trend another tool measured, as it is: for subscriptions, one category_trends entry of well_measure_subscriptions; for a cost trend, the per-month category sums of well_sum_transactions, converted at the rate the answer states and folded only by adding. Never invent a figure, and never edit a measured amount.

The card draws one line per series over the months, with a legend naming each. A series with a null label is drawn as "Uncategorised", or as the rolled-up line when is_other is true.

REFUSED rather than drawn:

  • months that are not consecutive calendar months, oldest first, or that reach the running month (UTC) or a later one: a month still running is not comparable to a complete one. A measure that ran just before the month changed is refused on its newest month: run it again

  • more than 24 months

  • more than 6 series, the rolled-up line included: fold the smallest into one is_other series, last

  • a series whose amounts do not hold one value per month, a negative amount, or a series with no reading at all

  • two series with one key, more than one is_other series, or an is_other series that is not last

  • a currency outside ISO-4217

The result echoes the input, and the text result is what you write the answer from: the card draws the lines and the legend only. Its gaps give each line's last month against its usual month, the mean of its readings over the up to 3 months before it (usual_amount, delta_amount, delta_percent). Quote them and compute no mean yourself. gaps.baseline_complete false means the trend holds fewer months before the last one: say so.

When the token authorizes one workspace, call this directly — no workspace call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.

Input Schema

NameRequiredDescriptionDefault
monthsYesThe complete months drawn, `YYYY-MM`, oldest first.
seriesYesThe lines, the rolled-up one last.
currencyYesISO-4217 code every amount is denominated in. Checked against the catalog, not its shape.
folded_countNoHow many categories folded into the rolled-up line.
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several: this read reports one workspace's own figures and will not choose which.
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.

Output Schema

NameRequiredDescriptionDefault
gapsYes
monthsYes
seriesYes
successYes
currencyYes
computed_byYes
folded_countYes
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changed
    • removedOutput schema / properties / gaps / properties / gaps / items / properties / delta_amount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / gaps / properties / gaps / items / properties / delta_amount / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / gaps / properties / gaps / items / properties / delta_percent / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / gaps / properties / gaps / items / properties / delta_percent / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / gaps / properties / gaps / items / properties / label / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / gaps / properties / gaps / items / properties / label / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / gaps / properties / gaps / items / properties / month_amount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / gaps / properties / gaps / items / properties / month_amount / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / gaps / properties / gaps / items / properties / usual_amount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / gaps / properties / gaps / items / properties / usual_amount / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / resolved_workspace / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / resolved_workspace / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / series / items / properties / amounts / items / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / series / items / properties / amounts / items / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / series / items / properties / category_key / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / series / items / properties / category_key / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / series / items / properties / label / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / series / items / properties / label / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed2 schema fields changed
    • addedOutput schema / properties / gaps
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "baseline_complete": {
      +      "type": "boolean"
      +    },
      +    "baseline_months": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "gaps": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "baseline_readings": {
      +            "type": "number"
      +          },
      +          "delta_amount": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "delta_percent": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "key": {
      +            "type": "string"
      +          },
      +          "label": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "month_amount": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "usual_amount": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "key",
      +          "label",
      +          "month_amount",
      +          "usual_amount",
      +          "baseline_readings",
      +          "delta_amount",
      +          "delta_percent"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "month": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "month",
      +    "baseline_months",
      +    "baseline_complete",
      +    "gaps"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "currency",
      -  "months",
      -  "series",
      -  "folded_count",
      -  "computed_by",
      -  "success"
      -]New value: +[
      +  "currency",
      +  "months",
      +  "series",
      +  "folded_count",
      +  "gaps",
      +  "computed_by",
      +  "success"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / properties / newly_connected / description
      Previous value: -"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."New value: +"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."
  4. Changed1 schema field changed
    • addedInput schema / properties / workspace_scope
      Added value: +{
      +  "description": "Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.",
      +  "enum": [
      +    "family"
      +  ],
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • addedOutput schema / properties / newly_connected
      Added value: +{
      +  "description": "Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "service_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "service_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  6. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the readOnly/non-destructive annotations: enumerates six categories of REFUSED inputs (non-consecutive months, running month, >24 months, >6 series, mismatched amounts, duplicate keys, non-ISO currency), explains why (a running month is not comparable), and documents the gaps return fields including baseline_complete. This is exactly the operational 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-loaded with the purpose and the "measures nothing" constraint, then organized into a scannable refusal list. Dense rather than padded, though the refusal block and gaps paragraph together run long for a render call and could be tightened slightly.

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?

Covers everything an agent needs: where the data must come from, what will be rejected, what the card draws versus what the text result carries, how to phrase gaps and baseline_complete in the answer, and workspace resolution. Return-value shape is handled by the description despite an output schema existing.

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 baseline is 3, but the description adds rendering semantics the schema cannot express: null label becomes "Uncategorised", is_other produces the rolled-up line and must be last, and series beyond six must be folded rather than dropped. It does not restate formats already in the schema.

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 concrete verb and resource ("Put a month-by-month trend with one line per category onto the category-trend card") and immediately distinguishes itself from its closest sibling by stating "This tool measures nothing." An agent can tell instantly that this renders rather than measures, unlike well_measure_category_trend.

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?

Names the exact upstream sources to use (one category_trends entry of well_measure_subscriptions, or per-month category sums from well_sum_transactions) and the condition (converted at the rate the answer states, folded only by adding). Also gives explicit workspace routing: call directly for a single-workspace token, pass workspace_id when several are authorized.

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