Skip to main content
Glama

get_invoice_link_per_payment

Read-onlyIdempotent

Retrieve the invoice number and a private expiring invoice link for a payment by supplying its payment or transaction ID. This read-only lookup supports reporting and invoice access without altering school data.

Instructions

๐ŸŸข READ-ONLY ยท GET /v2/payments/{id}/invoice-link

Get invoice link per payment. Returns the invoice number and a private expiring link to acccess the invoice.

Behavior: read-only lookup against the live school; creates, changes and deletes nothing. Auth (admin API token + Lw-Client id) is injected server-side, never by the model; calls are throttled to stay under LearnWorlds' 30-per-10s cap and retried on 429/5xx. Returns: HTTP <status> followed by the LearnWorlds JSON response body. A non-2xx reply surfaces as a tool error with that status and the API error payload โ€” 401 bad/expired token, 403 not permitted, 404 no such record, 422 rejected input. Use when: safe to call speculatively for lookups and reporting. Not for changing anything โ€” use the matching ๐ŸŸก write tool. Related Payments tools: get_payment, get_payments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPayment Id or Transaction id

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/destructive annotations, it discloses auth handling, server-side injection, throttling to LearnWorlds' cap, retry behavior on 429/5xx, the raw output shape (HTTP status + JSON body), and per-status error semantics. This gives the agent a realistic picture of side effects and failure modes.

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 front-loaded with the endpoint and helpful read-only marker, then uses labeled sections (Behavior, Returns, Use when) to pack dense, useful constraints without repetition. Every sentence adds operational value.

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 one-parameter, read-only lookup with no output schema, the description covers what returns, how errors surface, what auth and throttling do, and when to use it. The only mild gap is a precise comparison with get_payment/get_payments, but the named siblings plus clear purpose make the tool safely callable.

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?

The single required parameter is fully described in the schema ('Payment Id or Transaction id'), so schema coverage is 100%; the description mainly reinforces that the lookup is per payment. It adds no format, provenance, or edge-case guidance for the id beyond what the schema already provides, 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?

The description opens with the exact verb, resource, and endpoint ('Get invoice link per payment', GET /v2/payments/{id}/invoice-link) and states the concrete return payload (invoice number and private expiring link). It is clearly distinguishable from sibling payment tools and the broader get_* family.

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 gives an explicit usage context ('safe to call speculatively for lookups and reporting') and an explicit exclusion ('Not for changing anything โ€” use the matching ๐ŸŸก write tool'). It names related Payments tools (get_payment, get_payments) as alternatives, though it does not spell out the exact selection rule among those three.

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/ohneben/Learnworlds-MCP'

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