Skip to main content
Glama

Set or remove a Wiro spend limit

manage_spend_limit
DestructiveIdempotent

Set, change, or remove monthly and daily USD spend limits for the whole account, team members, API keys, surfaces, or agents; review a summary before confirming.

Instructions

Set (add or change) or remove one spend limit of the connected project's workspace: a monthly or daily USD cap on the whole wallet (account), one team member, one API key (project), one way in (surface) or one agent. A limit counts the whole period in UTC, also what was spent before it was set, and once it is reached new work it covers is refused with error code 93. Each target can have one monthly and one daily limit. Only the account owner, a team admin or the organization's owner can change limits; for anyone else this changes nothing. Without confirm: true it returns a change summary: what the limit covers, its value before and after, what was spent this period and when it resets. Show it, wait for a clear yes, then repeat the call exactly as its nextAction shows. If the limit changed in between, or the call asks for anything else, nothing is saved and a new summary comes back. To change only the alert, give limit_guid and alert_percent.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "manage_spend_limit"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentNoScope agent: the deployed agent, by name or guid.
scopeNoWhat the limit caps: account (the whole wallet), member (one team member), project (one API key), surface (one way in) or agent (one deployed agent). Needed unless limit_guid names the limit.
actionYesset adds a limit, or changes the one with the same scope, target and period; remove deletes one.
memberNoScope member, teams only: the member, by e-mail or user id.
periodNomonth (from the 1st, 00:00 UTC) or day (from 00:00 UTC). Left out, the period of the target's only limit, and month for a new one.
confirmNoSet true only by repeating the change summary's nextAction, after the user approved that summary.
projectNoScope project: the API key's project, by id or exact name. Left out, this connection's own key.
surfaceNoScope surface: web (the dashboard), api (an API key), mcp (this server, hosted at mcp.wiro.ai or run yourself), llm-gateway, extension, agent (deployed agents' own runs), studio (messages to Studio and the models it runs), workflow-agent (messages to the Workflow Agent) or workflow (workflow runs and their steps, unless an agent, Studio or the Workflow Agent started them).
amount_usdNoset: the limit in USD, at least 0.01, rounded to cents. Left out with alert_percent, a limit keeps its amount.
limit_guidNoThe limit's guid from get_controls, in place of scope, its target and period.
summary_idNoFrom the change summary's nextAction: the id of the change the user saw. Never set it yourself.
updated_atNoFrom the change summary's nextAction: the version of the limit the user saw. Never set it yourself.
alert_percentNoset: when the alert email goes out, at 50, 80 or 90 percent of the limit; null for no alert. Left out, a limit keeps its alert, and a new one gets 80.

Output Schema

NameRequiredDescriptionDefault
afterYesThe limit after the change; null for a removal.
notesYes
actionYes
beforeYesThe limit before the change; null when there was none.
periodNo
targetNo
messageYes
outcomeYespreview: a change summary, nothing changed yet. saved or removed: done. unchanged: it was already so. refused: this connection cannot change spend limits.
warningsYes
workspaceYes
nextActionNo
dashboardUrlYes
usedUpAtOnceNoTrue when this period's spending already reaches the new amount, so new work it covers is refused at once.
alertRecipientsNoWho gets the alert email and the email when the limit is used up.
changedSinceSummaryNoTrue when the limit changed after the summary the user saw: this is a new summary, and nothing was saved.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • changedInput schema / properties / surface / description
      Previous value: -"Scope surface: web (the dashboard), api (an API key, a local install of this server included), mcp (the hosted MCP server), llm-gateway, extension or agent."New value: +"Scope surface: web (the dashboard), api (an API key), mcp (this server, hosted at mcp.wiro.ai or run yourself), llm-gateway, extension, agent (deployed agents' own runs), studio (messages to Studio and the models it runs), workflow-agent (messages to the Workflow Agent) or workflow (workflow runs and their steps, unless an agent, Studio or the Workflow Agent started them)."
    • changedInput schema / properties / surface / enum
      Previous value: -[
      -  "web",
      -  "api",
      -  "mcp",
      -  "llm-gateway",
      -  "extension",
      -  "agent"
      -]New value: +[
      +  "web",
      +  "api",
      +  "mcp",
      +  "llm-gateway",
      +  "extension",
      +  "agent",
      +  "studio",
      +  "workflow-agent",
      +  "workflow"
      +]
  2. Changed2 schema fields changedv1.9.1
    • changedOutput schema / properties / after / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "alertPercent": {
      -        "anyOf": [
      -          {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "The alert email goes out at this percent of the amount; null for none."
      -      },
      -      "amountUsd": {
      -        "type": "number"
      -      },
      -      "guid": {
      -        "type": "string"
      -      },
      -      "heldUsd": {
      -        "description": "Held by work that is still running, until it is charged or ends.",
      -        "type": "number"
      -      },
      -      "leftUsd": {
      -        "description": "What new work can still use: the amount less what was spent and what is held.",
      -        "type": "number"
      -      },
      -      "period": {
      -        "description": "A monthly limit runs from the 1st at 00:00 UTC, a daily one from 00:00 UTC.",
      -        "enum": [
      -          "month",
      -          "day"
      -        ],
      -        "type": "string"
      -      },
      -      "periodStart": {
      -        "type": "string"
      -      },
      -      "resetsAt": {
      -        "type": "string"
      -      },
      -      "scope": {
      -        "description": "What the limit caps: the whole wallet (account), one team member, one API key (project), one way in (surface) or one agent.",
      -        "enum": [
      -          "account",
      -          "member",
      -          "project",
      -          "surface",
      -          "agent"
      -        ],
      -        "type": "string"
      -      },
      -      "spentUsd": {
      -        "description": "Spent in the current period, including what was spent before the limit was set.",
      -        "type": "number"
      -      },
      -      "target": {
      -        "description": "The member's user id, the project id, the surface or the agent guid; absent for the whole wallet.",
      -        "type": "string"
      -      },
      -      "targetName": {
      -        "type": "string"
      -      },
      -      "thisConnection": {
      -        "description": "True for the API key this connection uses, the surface it counts as, or in a team the member it acts as.",
      -        "type": "boolean"
      -      },
      -      "updatedAt": {
      -        "description": "When the limit last changed, in Unix seconds.",
      -        "maximum": 9007199254740991,
      -        "minimum": -9007199254740991,
      -        "type": "integer"
      -      },
      -      "usedUp": {
      -        "description": "True when what was spent reached the amount: new work it covers is refused with error code 93.",
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "scope",
      -      "period",
      -      "amountUsd",
      -      "spentUsd",
      -      "leftUsd",
      -      "usedUp",
      -      "alertPercent"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "alertPercent": {
      +        "anyOf": [
      +          {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The alert email goes out at this percent of the amount; null for none."
      +      },
      +      "amountUsd": {
      +        "type": "number"
      +      },
      +      "guid": {
      +        "type": "string"
      +      },
      +      "heldUsd": {
      +        "description": "Held by work that is still running, until it is charged or ends.",
      +        "type": "number"
      +      },
      +      "leftUsd": {
      +        "description": "What new work can still use: the amount less what was spent and what is held.",
      +        "type": "number"
      +      },
      +      "period": {
      +        "description": "A monthly limit runs from the 1st at 00:00 UTC, a daily one from 00:00 UTC.",
      +        "enum": [
      +          "month",
      +          "day"
      +        ],
      +        "type": "string"
      +      },
      +      "periodStart": {
      +        "type": "string"
      +      },
      +      "resetsAt": {
      +        "type": "string"
      +      },
      +      "scope": {
      +        "description": "What the limit caps: the whole wallet (account), one team member, one API key (project), one way in (surface) or one agent.",
      +        "enum": [
      +          "account",
      +          "member",
      +          "project",
      +          "surface",
      +          "agent"
      +        ],
      +        "type": "string"
      +      },
      +      "spentUsd": {
      +        "description": "Spent in the current period, including what was spent before the limit was set.",
      +        "type": "number"
      +      },
      +      "target": {
      +        "description": "The member's user id, the project id, the surface or the agent guid; absent for the whole wallet.",
      +        "type": "string"
      +      },
      +      "targetName": {
      +        "type": "string"
      +      },
      +      "thisConnection": {
      +        "description": "True for the API key this connection uses, the surface it counts as, or in a team the member it acts as.",
      +        "type": "boolean"
      +      },
      +      "updatedAt": {
      +        "description": "When the limit last changed, in Unix seconds.",
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "updatedBy": {
      +        "additionalProperties": false,
      +        "description": "Who changed it last. Absent when Wiro did not say, or when a change Wiro made itself was the last.",
      +        "properties": {
      +          "name": {
      +            "description": "Their name or e-mail, or \"the organization owner\"; absent for someone who is no longer in the team.",
      +            "type": "string"
      +          },
      +          "useruuid": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "useruuid"
      +        ],
      +        "type": "object"
      +      },
      +      "usedUp": {
      +        "description": "True when what was spent reached the amount: new work it covers is refused with error code 93.",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "scope",
      +      "period",
      +      "amountUsd",
      +      "spentUsd",
      +      "leftUsd",
      +      "usedUp",
      +      "alertPercent"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / before / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "alertPercent": {
      -        "anyOf": [
      -          {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "The alert email goes out at this percent of the amount; null for none."
      -      },
      -      "amountUsd": {
      -        "type": "number"
      -      },
      -      "guid": {
      -        "type": "string"
      -      },
      -      "heldUsd": {
      -        "description": "Held by work that is still running, until it is charged or ends.",
      -        "type": "number"
      -      },
      -      "leftUsd": {
      -        "description": "What new work can still use: the amount less what was spent and what is held.",
      -        "type": "number"
      -      },
      -      "period": {
      -        "description": "A monthly limit runs from the 1st at 00:00 UTC, a daily one from 00:00 UTC.",
      -        "enum": [
      -          "month",
      -          "day"
      -        ],
      -        "type": "string"
      -      },
      -      "periodStart": {
      -        "type": "string"
      -      },
      -      "resetsAt": {
      -        "type": "string"
      -      },
      -      "scope": {
      -        "description": "What the limit caps: the whole wallet (account), one team member, one API key (project), one way in (surface) or one agent.",
      -        "enum": [
      -          "account",
      -          "member",
      -          "project",
      -          "surface",
      -          "agent"
      -        ],
      -        "type": "string"
      -      },
      -      "spentUsd": {
      -        "description": "Spent in the current period, including what was spent before the limit was set.",
      -        "type": "number"
      -      },
      -      "target": {
      -        "description": "The member's user id, the project id, the surface or the agent guid; absent for the whole wallet.",
      -        "type": "string"
      -      },
      -      "targetName": {
      -        "type": "string"
      -      },
      -      "thisConnection": {
      -        "description": "True for the API key this connection uses, the surface it counts as, or in a team the member it acts as.",
      -        "type": "boolean"
      -      },
      -      "updatedAt": {
      -        "description": "When the limit last changed, in Unix seconds.",
      -        "maximum": 9007199254740991,
      -        "minimum": -9007199254740991,
      -        "type": "integer"
      -      },
      -      "usedUp": {
      -        "description": "True when what was spent reached the amount: new work it covers is refused with error code 93.",
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "scope",
      -      "period",
      -      "amountUsd",
      -      "spentUsd",
      -      "leftUsd",
      -      "usedUp",
      -      "alertPercent"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "alertPercent": {
      +        "anyOf": [
      +          {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The alert email goes out at this percent of the amount; null for none."
      +      },
      +      "amountUsd": {
      +        "type": "number"
      +      },
      +      "guid": {
      +        "type": "string"
      +      },
      +      "heldUsd": {
      +        "description": "Held by work that is still running, until it is charged or ends.",
      +        "type": "number"
      +      },
      +      "leftUsd": {
      +        "description": "What new work can still use: the amount less what was spent and what is held.",
      +        "type": "number"
      +      },
      +      "period": {
      +        "description": "A monthly limit runs from the 1st at 00:00 UTC, a daily one from 00:00 UTC.",
      +        "enum": [
      +          "month",
      +          "day"
      +        ],
      +        "type": "string"
      +      },
      +      "periodStart": {
      +        "type": "string"
      +      },
      +      "resetsAt": {
      +        "type": "string"
      +      },
      +      "scope": {
      +        "description": "What the limit caps: the whole wallet (account), one team member, one API key (project), one way in (surface) or one agent.",
      +        "enum": [
      +          "account",
      +          "member",
      +          "project",
      +          "surface",
      +          "agent"
      +        ],
      +        "type": "string"
      +      },
      +      "spentUsd": {
      +        "description": "Spent in the current period, including what was spent before the limit was set.",
      +        "type": "number"
      +      },
      +      "target": {
      +        "description": "The member's user id, the project id, the surface or the agent guid; absent for the whole wallet.",
      +        "type": "string"
      +      },
      +      "targetName": {
      +        "type": "string"
      +      },
      +      "thisConnection": {
      +        "description": "True for the API key this connection uses, the surface it counts as, or in a team the member it acts as.",
      +        "type": "boolean"
      +      },
      +      "updatedAt": {
      +        "description": "When the limit last changed, in Unix seconds.",
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "updatedBy": {
      +        "additionalProperties": false,
      +        "description": "Who changed it last. Absent when Wiro did not say, or when a change Wiro made itself was the last.",
      +        "properties": {
      +          "name": {
      +            "description": "Their name or e-mail, or \"the organization owner\"; absent for someone who is no longer in the team.",
      +            "type": "string"
      +          },
      +          "useruuid": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "useruuid"
      +        ],
      +        "type": "object"
      +      },
      +      "usedUp": {
      +        "description": "True when what was spent reached the amount: new work it covers is refused with error code 93.",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "scope",
      +      "period",
      +      "amountUsd",
      +      "spentUsd",
      +      "leftUsd",
      +      "usedUp",
      +      "alertPercent"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Addedv1.9.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag mutation, destructiveness, and idempotency, but the description adds substantial context: UTC period counting includes prior spend, error code 93 on limit reached, one monthly and one daily per target, owner/admin permission requirement, and the change-summary/concurrency behavior. These details materially help an agent avoid incorrect writes.

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?

It is a single dense paragraph but front-loads the core action before elaborating on periods, permissions, and confirmation. The length is mostly justified by the 13-parameter mutation and two-step flow, though bullet-like separation could improve scanability.

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?

Given the complex mutation, 13 parameters, and presence of an output schema, the description covers the critical behavioral aspects an agent needs: scope, period counting, permissions, confirmation protocol, and concurrency detection. No essential caller guidance appears missing.

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% and already documents each parameter, so the baseline is 3. The description adds procedural meaning for confirm ('Set true only by repeating...'), summary_id/updated_at ('from the change summary's nextAction'), and limit_guid as an alternative to scope, which raises it to 4.

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 opens with a specific verb pair ('Set ... or remove') and the exact resource ('one spend limit'), then enumerates all five scopes (account, member, project, surface, agent). This lets an agent distinguish it from adjacent billing/agent tools without opening the schema.

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?

It describes the confirmation workflow and a specific variant ('To change only the alert, give limit_guid and alert_percent'), and notes permission constraints. However it does not name sibling tools or explicitly say when not to use it, so an agent must infer routing from scope names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.