Skip to main content
Glama

haldir_authorize_payment

Authorize a payment against a session’s spending cap before calling the payment provider, blocking transactions that would exceed the budget.

Instructions

Authorize a payment against a session's spend_limit. Returns 403 if it would over-run the budget — use this BEFORE calling the payment provider so the governance layer gets a chance to block.

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": {
      "session_id": "<session_id>",
      "amount": "<amount>"
    },
    "name": "haldir_authorize_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYes
currencyNoUSD
session_idYes
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.3

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the key behavioral trait: a 403 rejection when the amount would over-run the budget. However, it says nothing about whether a successful call reserves or holds budget, whether it is idempotent, or what credentials the caller needs.

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?

Two sentences, zero filler, and the core action plus the budget-overrun consequence are front-loaded ahead of the ordering advice. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter, no-annotation, no-output-schema mutation-style gate, the description covers the happy path, the failure mode, and call ordering. It omits the semantics of half the parameters and any indication of what a successful authorization returns or reserves, which leaves real gaps for an agent wiring this into a payment flow.

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

Parameters2/5

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

Schema description coverage is 0% across four parameters. The description only implies what session_id and amount mean through the phrase 'against a session's spend_limit'; it says nothing about the currency parameter (which defaults to USD) or the free-text description field, so it fails to compensate for the coverage gap.

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 ('Authorize a payment') plus the scope it applies to ('against a session's spend_limit'). No sibling in the catalog does payment authorization, so the agent can distinguish it without opening any schema.

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 an explicit ordering instruction: call this BEFORE the payment provider so the governance layer can block. That is concrete when-to-use guidance. It stops short of naming when-not to use it or pointing at an alternative tool for an adjacent need.

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