Skip to main content
Glama

Spend credits to unlock a finished job

unlock_job
Idempotent

Spends the customer's credits to unlock a finished job's files. Only call once get_job says the job is ready and the customer has approved a maximum spend. Refuses, charging nothing, if the job costs more than max_credits, is not ready, or the balance is short (the error says which, with the amount needed). A job that is already unlocked comes back as it is, with no charge and no balance or max_credits check. Needs a signed-in connection with spend access. Returns the job (same shape as get_job, with unlocked: true) plus credits_left and next: 'get_downloads'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesThe id (UUID) of a ready job on this account.
max_creditsYesThe most the customer agreed to spend on this job, 1 to 100 credits. The unlock is refused, charging nothing, if the job costs more.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / job_id / description
      Added value: +"The id (UUID) of a ready job on this account."
    • changedInput schema / properties / max_credits / description
      Previous value: -"The most the customer agreed to spend on this job"New value: +"The most the customer agreed to spend on this job, 1 to 100 credits. The unlock is refused, charging nothing, if the job costs more."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already include idempotentHint=true and destructiveHint=false, and the description adds crucial behavioral context: refusal conditions (cost > max_credits, not ready, short balance), no charge for already-unlocked jobs, auth requirement ('signed-in connection with spend access'), and return shape. This goes well beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, each earning its place: purpose, precondition, refusal behavior, idempotent behavior, auth, and return value. Front-loaded with the core action and precondition, no filler or repetition of schema details.

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?

For a 2-param tool with no output schema, the description is complete: it covers preconditions, failure modes, idempotency, auth, and return shape. An agent has everything needed to call it correctly and interpret the result.

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 the baseline is 3. The description adds meaning by explaining the guardrail semantics of max_credits ('The unlock is refused, charging nothing, if the job costs more') and the readiness precondition for job_id, which the schema alone does not convey. It doesn't add format details, but the schema already covers those.

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 states a specific verb ('Spends'), a resource ('customer's credits'), and the target ('unlock a finished job's files'). It clearly differentiates from siblings like get_job (which only reports status) and estimate_media_job (which estimates cost), so an agent can tell when to invoke this tool.

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?

Explicitly says 'Only call once get_job says the job is ready and the customer has approved a maximum spend.' It also names the next step ('next: get_downloads') and the alternative path (get_job for status), giving clear when-to-use and sequencing guidance.

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.