Skip to main content
Glama

get_arbitrum_invoice

Retrieve an invoice to pay for semantic web search with ETH on Arbitrum as an alternative to Lightning Network payments.

Instructions

Get payment info to pay with ETH on Arbitrum instead of Lightning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_arbitrum_invoice MCP tool handler function. Gets payment info for Arbitrum ETH payments by calling arb_pay.get_invoice_info('search'). Returns payment details including price in ETH, contract address, service ID, and instructions.
    @mcp.tool()
    def get_arbitrum_invoice() -> str:
        """Get payment info to pay with ETH on Arbitrum instead of Lightning."""
        info = arb_pay.get_invoice_info("search")
        return (
            f"Pay {info['price_eth']} ETH on {info['network']}.\n\n"
            f"Contract: {info['contract']}\n"
            f"Service ID: {info['service_id']}\n\n"
            f"{info['instructions']}\n"
            f"Then call search_web or search_news with the tx_hash."
        )
  • server.py:97-107 (registration)
    The @mcp.tool() decorator registers the get_arbitrum_invoice function as an MCP tool. This is the registration point for the tool.
    @mcp.tool()
    def get_arbitrum_invoice() -> str:
        """Get payment info to pay with ETH on Arbitrum instead of Lightning."""
        info = arb_pay.get_invoice_info("search")
        return (
            f"Pay {info['price_eth']} ETH on {info['network']}.\n\n"
            f"Contract: {info['contract']}\n"
            f"Service ID: {info['service_id']}\n\n"
            f"{info['instructions']}\n"
            f"Then call search_web or search_news with the tx_hash."
        )
  • Helper function get_invoice_info() that returns payment data for on-chain Arbitrum payments. Defines network, contract address, service ID mapping, price in wei and ETH, and payment instructions.
    def get_invoice_info(service: str) -> dict:
        """Retorna los datos para que el agente pague on-chain."""
        sid   = SERVICE_IDS.get(service)
        price = SERVICE_PRICES.get(service, 0)
        chain = "arbitrum-one" if "sepolia" in ARBITRUM_RPC else "arbitrum-one"
        return {
            "network":      chain,
            "contract":     CONTRACT_ADDRESS,
            "service_id":   sid,
            "price_wei":    price,
            "price_eth":    str(Web3.from_wei(price, "ether")),
            "instructions": (
                f"Call pay({sid}) on the contract sending {price} wei. "
                "Then pass the transaction hash to the tool."
            ),
        }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It successfully discloses the payment method (ETH/Arbitrum), but lacks disclosure of behavioral traits like whether this creates a new invoice, idempotency, expiration behavior, or side effects.

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?

Single sentence with zero waste. Front-loaded with the action verb, immediately qualifies the payment method, and ends with the differentiating clause. Every word serves a purpose.

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?

Given the zero-parameter complexity and presence of an output schema (covering return values), the description is nearly complete. It covers purpose and differentiation, though additional context on invoice lifecycle or expiration would strengthen it for a financial 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?

The input schema has zero parameters, which per guidelines establishes a baseline of 4. The description appropriately does not invent parameter semantics where none exist.

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 provides a specific verb ('Get'), clear resource ('payment info'), and precise scope ('ETH on Arbitrum'). It effectively distinguishes from sibling tool get_invoice by specifying the alternative payment rail ('instead of Lightning').

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?

Implicitly indicates when to use this tool (when paying with ETH on Arbitrum) and contrasts it with the Lightning alternative. However, it does not explicitly name the sibling tool (get_invoice) or state explicit 'when-not' conditions, falling short of perfect guidance.

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/giskard09/giskard-search'

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