Skip to main content
Glama

Set spend-down for a Cursor key

set_byok_spend_down
Idempotent

Turn spend-down mode on or off for a project Cursor key and configure credit expiry, model, daily fix limit, and start window so Mushi auto-dispatches open reports as draft PRs.

Instructions

Turn spend-down mode on or off for one of this project's own Cursor keys and set when its credits expire (YYYY-MM-DD), the Cursor model (id?param=value), fixes per day (1-200) and how many days before expiry to start (1-90). While on, Mushi dispatches the project's best open reports to Cursor on its own, inside the auto-fix caps; each fix opens a draft PR. A key shared by the organization can only be changed by an org owner or admin in the console. Write; spends Cursor credits once on; idempotent. Confirm with the user before turning it on.

Input Schema

NameRequiredDescriptionDefault
keyIdYesCursor key id from get_spend_down_status
modelNoCursor model spec, e.g. grok-4.7?reasoning_effort=xhigh&context=500k
enabledNoTurn spend-down on or off
projectIdYesProject id (`project_id` is accepted too.)
dailyLimitNoFixes per day across the apps this key pays for
windowDaysNoStart this many days before the credits expire
creditsExpireAtNoWhen the credits expire, YYYY-MM-DD

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.17

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare readOnlyHelper=false, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is already structured. The description adds real behavioral context beyond that: it spends Cursor credits once when enabled, each dispatched fix opens a draft PR, work is bounded by auto-fix caps, and the org-owner restriction on shared keys. This is exactly the kind of side-effect disclosure 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?

It is front-loaded with the action and its side effects, then the constraints, then the confirmation requirement – a sensible ordering with little waste. A single dense paragraph packs formats, ranges, consequences and prerequisites; it is information-rich rather than padded, though slightly overstuffed for skimming.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter mutation with no output schema, the description covers consequences, authorization limits and the pre-call confirmation step. It does not state what happens to optional fields when omitted (are unspecified settings left untouched or cleared under the idempotent semantics) nor whether turning the mode off has any cleanup effect – small but real gaps.

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% and each parameter is already documented in the schema with the same domain phrasing (e.g. dailyLimit "Fixes per day across the apps this key pays for", windowDays "Start this many days before the credits expire"). The description mostly restates those formats and ranges rather than adding new semantics. Baseline 3 is appropriate when the schema does the heavy lifting.

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 names a specific verb (turn on/off), resource (spend-down mode for one of this project's Cursor keys), and the concrete sub-effects (credit expiry, model spec, daily fix cap, lead window). It is clearly distinguished from the sibling read/inspection tools (get_spend_down_status, list_byok_keys) and from add_byok_key/remove_byok_key.

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?

It gives the agent an explicit operating condition ("While on, Mushi dispatches..."), a prerequisite it cannot infer from the schema (a key shared by the organization can only be changed by an org owner/admin in the console), and a required procedural step ("Confirm with the user before turning it on"). The status tool is also implicitly the source of keyId.

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