Skip to main content
Glama

agora_get_payment_offers

Retrieve payment options for Agora products using product details, shipping address, and user information to generate L402-compatible offers.

Instructions

Get the payment offers for a product in Agora. Some products do not have variants, in such cases use the product_id as variant_id too.
Before calling this tool, check if the user has already provided the shipping address and user information. 
Otherwise, ask the user for the shipping address and user information.

If the user does not provide an `addressName`, use the `firstname` and `lastname` to populate it.
Args:
    slug: The product slug.
    product_id: The product ID as str delimited by escaped double quotes
    variant_id: The product variant ID as str delimited by escaped double quotes
    quantity: The quantity to purchase.
    shipping_address: The shipping address.
    user: The user information.
    
Example:
    product_id = "\"1234567890\""
    variant_id = "\"1234567890\""
    shipping_address = {
        "addressName": "John Doe",
        "addressFirst": "123 Main St",
        "city": "New York",
        "state": "NY",
        "country": "US",
        "zipCode": "10001"
    }
    
    user = {
        "firstname": "John",
        "lastname": "Doe",
        "email": "john@example.com",
    }
    
Returns:
    L402 offer that can be paid by L402-compatible clients.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes
product_idYes
variant_idYes
shipping_addressYes
userYes
quantityNo

Implementation Reference

  • The handler function for the 'agora_get_payment_offers' tool. It is decorated with @mcp.tool() for registration and implements the core logic by invoking Agora's buy_now method with provided parameters and handling the response.
    @mcp.tool()
    async def agora_get_payment_offers(slug: str, product_id: str , variant_id: str, shipping_address: Dict,
                     user: Dict, quantity: int = 1) -> Dict:
        """
        Get the payment offers for a product in Agora. Some products do not have variants, in such cases use the product_id as variant_id too.
        Before calling this tool, check if the user has already provided the shipping address and user information. 
        Otherwise, ask the user for the shipping address and user information.
    
        If the user does not provide an `addressName`, use the `firstname` and `lastname` to populate it.
        Args:
            slug: The product slug.
            product_id: The product ID as str delimited by escaped double quotes
            variant_id: The product variant ID as str delimited by escaped double quotes
            quantity: The quantity to purchase.
            shipping_address: The shipping address.
            user: The user information.
            
        Example:
            product_id = "\\"1234567890\\""
            variant_id = "\\"1234567890\\""
            shipping_address = {
                "addressName": "John Doe",
                "addressFirst": "123 Main St",
                "city": "New York",
                "state": "NY",
                "country": "US",
                "zipCode": "10001"
            }
            
            user = {
                "firstname": "John",
                "lastname": "Doe",
                "email": "john@example.com",
            }
            
        Returns:
            L402 offer that can be paid by L402-compatible clients.
        """
        response = get_agora().buy_now(
            slug=slug,
            product_id=product_id,
            variant_id=variant_id,
            quantity=quantity,
            shipping_address=shipping_address,
            user=user
        )
        return handle_response(response)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains the tool's behavior: handling products without variants (using product_id as variant_id), requiring specific user data before invocation, and returning 'L402 offer that can be paid by L402-compatible clients.' It doesn't cover error conditions or rate limits, but provides substantial operational context.

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

Conciseness3/5

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

The description is appropriately front-loaded with the core purpose, but contains some redundancy (the example repeats information from the Args section). The structure is logical but could be more streamlined. The Args section duplicates parameter names that are already in the schema, though the explanations add value.

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 complexity (6 parameters including nested objects, no annotations, no output schema), the description provides substantial context. It explains prerequisites, parameter relationships, includes a detailed example, and describes the return value. The main gap is lack of error handling information, but overall it's quite complete for a tool with this complexity.

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?

With 0% schema description coverage, the description compensates well by explaining parameter semantics in the Args section and providing a detailed example. It clarifies the relationship between product_id and variant_id for products without variants, shows the format for product_id and variant_id (as str delimited by escaped double quotes), and illustrates the structure of shipping_address and user objects. This adds significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the payment offers for a product in Agora.' It specifies the resource (payment offers) and context (Agora platform), though it doesn't explicitly differentiate from sibling tools like agora_get_order or agora_get_product_detail. The description is specific but lacks sibling comparison.

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?

The description provides excellent usage guidance with explicit prerequisites: 'Before calling this tool, check if the user has already provided the shipping address and user information. Otherwise, ask the user for the shipping address and user information.' It also includes a specific rule for handling missing addressName. This gives clear when-to-use instructions.

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/Fewsats/agora-mcp'

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