Skip to main content
Glama

Refund escrow job

refund_job

Return held escrow credits to the payer when the work is not delivered or the job is cancelled. The payer or the payee can refund, and only while the job is held. The full hold goes back to the payer; no platform fee is taken. Refunding twice, or refunding after release, is rejected and does not move credits again. Same as POST /v1/jobs/:id/refund.

Input Schema

NameRequiredDescriptionDefault
job_idYesEscrow job id returned by create_job (job_…).
api_keyNoWallet API key (bsk_…). Optional when the MCP client sends Authorization: Bearer. The local stdio process also reads BOTSUPPLY_API_KEY.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the money movement (full hold returns to payer, no platform fee taken), the authorization model (payer or payee), and the rejection behavior on repeat or post-release calls. It also maps the tool to its REST equivalent (POST /v1/jobs/:id/refund). The non-idempotent-but-guarded behavior described is consistent with idempotentHint=false.

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?

Five tight sentences, front-loaded with the core action and its condition, then authorization, then the credit outcome, then the error guards. Every sentence carries distinct information with no filler.

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?

There is no output schema, and the description covers the essential return behavior (full hold back to payer, no fee) and error cases, which is close to sufficient. It does not describe the response shape or any resulting job status, a minor gap for a mutation tool with no output schema.

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 both parameters (job_id, api_key) are documented there, including the bsk_ prefix and the BOTSUPPLY_API_KEY fallback. The description adds no parameter-level detail beyond that, so the 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 and resource ('Return held escrow credits to the payer') plus the triggering conditions (work not delivered, job cancelled). It implicitly distinguishes itself from the sibling release_job by explaining that 'refunding after release is rejected', so an agent can route without opening schemas.

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?

Gives clear preconditions: only while the job is held, and either payer or payee may invoke it. It also names the failure cases (double refund, refund after release) that should steer an agent away. It never explicitly names release_job as the alternative path, so it stops just short of full when/when-not/alternative 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.

Resources