Skip to main content
Glama

pay_application

Pay for an accepted application from the mentee's credit balance. Requires Authorization: Bearer. If credits are short this returns payment_required. MCP clients cannot send HTTP Payment headers — pass payment_credential if the host wallet provides an MPP object, or use open_dashboard and pay in the browser, then retry.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "application_hash": "<application_hash>"
    },
    "name": "pay_application"
  }
}

Input Schema

NameRequiredDescriptionDefault
application_hashYes
payment_credentialNo

Output Schema

NameRequiredDescriptionDefault
endNo
kindNointro_call, mentorship_call, or session.
errorNopayment_required, invalid_payment, auth_required, not_found, etc.
startNo
intentNocharge
methodNostripe
statusNo'paid', 'topped_up', or absent on payment_required.
messageNo
pay_urlNoREST URL to retry with an MPP Payment credential.
receiptNoBase64url MPP receipt.
currencyNousd
setup_idNo
availableNo
challengeNoMPP challenge. Present when error is payment_required.
next_stepNo
amount_usdNoCharge or top-up amount in whole USD.
mentorshipNo
applicationNo
credits_usdNo
billing_noteNo
booking_hashNo
calendar_linkNo
dashboard_urlNo
mentorship_hashNo
application_hashNo
www_authenticateNoWWW-Authenticate Payment header value from the REST 402.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true), the description discloses the auth requirement, the specific error return payment_required on insufficient credits, and a host capability constraint (MCP clients cannot send HTTP Payment headers) with the accepted workaround. This is exactly the kind of behavioral context annotations cannot carry.

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

Conciseness4/5

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

Three short sentences that are front-loaded: what it does, then prerequisites, then the fallback path. The only friction is the unexplained 'MPP' term and the compressed clause about HTTP Payment headers, which an unfamiliar agent may have to re-read.

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?

With an output schema present, return values need not be spelled out, and the description still covers the important error path, auth, and the credential fallback. It stops short of stating idempotency or what happens when the caller retries after a successful payment, which matters for a spender tool.

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 0%, so the description must compensate, and it does for payment_credential — explaining it should carry an MPP object from the host wallet and why it exists. It leaves application_hash's format unstated and never expands the 'MPP' acronym, so the compensation is not complete.

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 (pay for an accepted application) plus the funding source (mentee's credit balance), which separates it from top_up_credits and from read-only siblings like get_application. The precondition 'accepted' is front-loaded so the agent knows the entry state.

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?

Gives an explicit when-to-use chain: it requires an accepted application and a bearer token, it names the failure signal (payment_required) when credits are short, and it routes to a concrete alternative (open_dashboard, pay in browser, then retry) when the MCP client cannot supply an HTTP Payment header.

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