Skip to main content
Glama

Unkey MCP by usefulapi

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. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already flag destructiveHint=true, so the mutation risk is covered structurally. The description adds the meaningful semantic that omitting value with operation=set produces an unlimited key, but says nothing about whether credits can go negative, what happens on decrement below zero, or what the call returns.

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 short sentences, front-loaded with the capability and the special case, with no filler. The trailing endpoint reference is redundancy for an agent but is short and consistent with the server's naming convention.

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 small three-parameter mutation with fully documented schema and no output schema, the description covers the operation modes and the unlimited edge case. Missing only boundary behavior (negative credit handling, response shape), which is minor given the annotation already signals destructiveness.

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 the schema already documents keyId, value, and operation, including the unlimited-on-omission behavior that the description repeats. The description adds no syntax or format detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Starts with a specific verb triple (set/increment/decrement) on a named resource (a key's remaining credits), which clearly separates it from the generic sibling unkey_update_key. It does not name that sibling explicitly, but the 'credits' scope makes the distinction inferable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The second sentence gives a concrete usage rule for one mode ('use set with no value for unlimited'), which is genuinely helpful. However there is no guidance on when to choose increment vs set vs decrement, and no statement of when this tool should not be used instead of unkey_update_key.

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.