Skip to main content
Glama
shukiv

blesta-mcp

by shukiv

Verify invoice payment link

verify_invoice_payment_link
Read-onlyIdempotent

Verify that a payment link or hash is valid for a given client and invoice, and check whether payment is still due.

Instructions

Check that a payment link/hash is valid for a given client and invoice, and report whether payment is still due. Accepts either the raw 16-character hash (with client_id) or the sid token / full payment URL (decrypted via Encryption.systemDecrypt). Wraps Invoices.verifyPayHash and Invoices.get. On IonCube-encoded installs this call fails with 'Failed to retrieve the default value' unless BLESTA_SYSTEM_KEY is configured.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sidNoThe `sid` query token, or the entire payment URL containing it
hashNoThe 16-character pay hash returned by create_invoice_payment_link
client_idNoNumeric client ID; required when `hash` is given, derived from `sid` otherwise
invoice_idYesNumeric invoice ID the link is for

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark the call as read-only/idempotent, and the description adds meaningful behavioral detail: internal decryption via Encryption.systemDecrypt, wrapping of Invoices.verifyPayHash and Invoices.get, and a concrete IonCube install failure mode tied to BLESTA_SYSTEM_KEY. No contradiction with 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?

Three tight sentences: purpose, input alternatives, and a critical environment-dependent failure. Each sentence carries distinct information and the purpose is front-loaded.

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 read-only verification tool with no output schema, the description explains purpose, input variants, and an environment failure, and notes the outcome ('whether payment is still due'). It doesn't specify the exact return payload shape, but that is a minor gap given the simple check semantics.

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 description coverage is 100%, so the baseline is 3; the description still adds operational meaning beyond the schema by explaining the hash-versus-sid alternatives, the required pairing of hash with client_id, and the decryption treatment of sid. This is more than the schema alone provides.

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?

Description opens with a specific action ('Check that a payment link/hash is valid'), scopes it to 'a given client and invoice', and names the outcome ('report whether payment is still due'). This clearly separates it from siblings like create_invoice_payment_link.

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?

It states the two accepted invocation modes (raw hash + client_id, or sid/full URL) and clarifies how they are processed, but it gives no explicit when-not-to-use guidance or named alternatives. The intended context is clear from the purpose.

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