Skip to main content
Glama
aayushsinghm16

harbor-mcp-server

Issue a refund

harbor_issue_refund
Destructive

Refund part or all of a paid invoice using a two-step flow: preview changes, then confirm with a token to execute.

Instructions

Refund part or all of a paid invoice. Requires two calls.

Call 1 — omit confirm_token. Returns a preview of exactly what would change, plus a token valid for 5 minutes. Call 2 — pass that token with identical arguments. The refund is written.

Args:

  • invoice_id (string): exact id, format inv_00123

  • amount_cents (number): 1 to 50000

  • reason (string): 4-200 chars, stored in the audit log

  • confirm_token (string, optional): omit first, then supply

Returns for the preview call: { "stage": "preview", "confirm_token": string, "expires_in_seconds": number, "invoice": { id, customer_id, amount_cents, already_refunded_cents, status }, "would_refund_cents": number, "resulting_refunded_cents": number }

Returns for the execute call: { "stage": "executed", "invoice_id": string, "refunded_cents": number, "total_refunded_cents": number }

Refuses when: the invoice does not exist, is not paid, or the refund would exceed the amount actually charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYesWhy this refund is being issued. Stored in the audit log.
invoice_idYesExact invoice id to refund against.
amount_centsYesAmount to refund, in cents. Maximum 50000.
confirm_tokenNoOmit on the first call to get a preview. Pass the returned token to execute.
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, but the description goes far beyond that by explaining the preview/execute two-step flow, token expiry (5 minutes), audit log storage, return shapes for both stages, and refusal rules. This adds substantial behavioral context that the annotations alone do not convey, with no contradictions.

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?

The description is well-organized with clear call labels, an Args list, return format examples, and refusal conditions. Every sentence conveys necessary information—no fluff or redundancy. The front-loaded 'Requires two calls' immediately signals the key complexity.

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?

Given the tool's complexity (two-call flow, no output schema), the description covers all essential aspects: purpose, step-by-step usage, parameter semantics, return values for both preview and execution, and failure conditions. It is self-contained enough for an agent to invoke correctly without additional external docs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the input schema already covers all parameters at 100%, the description enriches them with practical formats (e.g., 'inv_00123'), ranges (1–50000 cents, 4–200 chars), and the crucial two-call semantics of confirm_token (omit, then supply). It clarifies the exact role of each parameter in the workflow, adding procedural meaning beyond the schema definitions.

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 clearly states the tool's function: 'Refund part or all of a paid invoice.' The specific verb 'refund' paired with the resource 'paid invoice' distinguishes it from all siblings (list, query, extend_trial, etc.). It also outlines the two-call execution model, making the purpose unmistakable.

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?

The description provides strong contextual guidance by detailing the two-call sequence, explicit refusal conditions (invoice not found, not paid, or would exceed amount), and parameter constraints. However, it does not explicitly mention when to use this tool over alternatives, though no sibling serves a similar purpose. This is a minor gap, hence 4 rather than 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aayushsinghm16/harbor-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server