Skip to main content
Glama

unkey

Update a key's credits

unkey_update_key_credits
Destructive

Set, increment or decrement a key's remaining credits. Use set with no value for unlimited. Unkey: POST /v2/keys.updateCredits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyIdYesThe key to change.
valueNoThe credit amount. Omit with operation=set to make the key unlimited.
operationYesHow to apply the value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, so the safety signal is present; the description adds meaningful semantic behavior for the unlimited case (omit value with operation=set). It does not, however, disclose whether decrement can drive credits negative, whether the change is reversible, or any auth requirements.

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?

Two tight sentences front-load the core operation and the unlimited special case. The trailing 'Unkey: POST /v2/keys.updateCredits' endpoint reference is minor filler but does not obscure the meaning.

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?

With only 3 params, full schema coverage, no nested objects, and an annotation covering destructiveness, the description gives enough to invoke the tool correctly. Missing only edge-case behavior (negative balances, error conditions), which is a modest gap for a simple mutation.

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 keyId, value, and operation are already documented in the schema. The description restates the unlimited-value rule that the value parameter's own description already covers, adding no new syntax or constraint detail. Baseline 3 applies.

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?

States a specific verb set (set/increment/decrement) and resource (a key's remaining credits), which clearly separates it from the sibling unkey_update_key that handles key metadata. An agent can identify the operation and target 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?

Provides an explicit conditional rule: 'Use set with no value for unlimited.' However, it offers no guidance on when to prefer this over unkey_update_key or any prerequisites such as required permissions, so the routing context is only partial.

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.