Skip to main content
Glama

Analyze Bill

analyze_bill

Read a bill from the user's description and create it for payment. This is the first step. Capture every address and identifier on the bill (remit-to address, account/invoice number, any code or pin) - missing details can delay or fail the payment. The remit-to address (where payment is sent) is especially important: it is what identifies the correct biller, and a wrong or missing one can match the bill to the wrong biller and cause a failed or delayed payment. Always include it. If the bill does not show a remit-to address, research the biller's official remit-to / payment address online and use that rather than omitting it. For the same reason, capture the bill's online-payment URL in payUrl and any payment phone number in otherInfo whenever the bill shows them - these strongly identify the correct biller. Always secure a user identifier so the payment can be applied to the right account or charge: capture the account/customer number in the account field, and any invoice, ticket, or reference number in otherInfo - capture all that the bill shows, since some billers need the account number plus another identifier. If the bill shows none, ask the user for one rather than proceeding without it. Before calling, ask the user how much they want to pay (the full balance amountDue, or a partial amount), then pass it as amount_to_pay and quote what they said in user_amount_statement - both are required (never invent the amount). If the payment carries a fee, the result includes a fees list - show any returned fee to the user before continuing. The result also includes a payment_link: give this link to the user as-is so they can enter their card on the secure form (the only way to set a payment method). If the user already exists from a prior bill, pass their user_id and auth_token to reuse the account.

Args:
    bill_description: structured bill details, including amountDue, amount_to_pay
        and user_amount_statement

Returns:
    bill/user identifiers, tokens, provider, amount due, the chosen amount_to_pay,
    a payment_link to the secure card form, and any user-facing fees

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bill_descriptionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.3/5.0
Behavior4/5

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

The description discloses that it creates a bill for payment, that fees may be returned and should be shown, and that a payment_link is returned for card entry. It adds guidance on reusing auth_token for existing users. Annotations already indicate non-read-only, so the description supplements with actionable behavioral details.

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 quite long and somewhat repetitive, especially around the remit-to address being critical. It is dense with useful instructions but lacks clear sectioning or bullet points, making it harder for an agent to quickly parse the key directives.

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?

The description covers all necessary context: required fields, handling missing information, pre-call user questions, reuse of auth tokens, and expected return values (fees, payment_link). Since an output schema exists, the description appropriately supplements rather than duplicates, making it complete for the tool's 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?

Although the schema includes detailed descriptions for all nested parameters, the tool description adds crucial workflow context: it explains the importance of remitAddress, how to fill amount_to_pay and user_amount_statement, and where to place invoice numbers in otherInfo. This goes beyond the schema's field-level descriptions.

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 clearly states the tool's function: "Read a bill from the user's description and create it for payment." It also positions it as "the first step" in the payment workflow, distinguishing it from sibling tools like confirm_payment_intent or check_payment_method.

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?

The description provides clear usage context: it is the first step, and it mandates pre-call actions like asking the user for the payment amount and capturing identifiers. It does not explicitly name when NOT to use it or mention alternative tools, but the context is unambiguous.

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.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool targets a distinct step in the bill payment lifecycle: analyze creates the bill, check_payment_method verifies card setup, confirm_payment_intent submits payment, fetch_bill_status tracks payment status, request_bill_cancellation stops a payment, and get_new_auth_token handles auth refresh. No two tools overlap in purpose, and descriptions clearly differentiate the check status vs. check card method tools.

Naming Consistency5/5

All six tools follow a consistent verb_noun pattern using snake_case: analyze_bill, check_payment_method, confirm_payment_intent, fetch_bill_status, get_new_auth_token, request_bill_cancellation. Verbs are descriptive and distinct, with no mixed conventions or ambiguous short names.

Tool Count5/5

Six tools is well-scoped for a bill payment domain: two core steps (analyze and confirm), one optional verification (card check), one status query, one cancellation, and one auth helper. The count feels neither sparse nor bloated, and each tool contributes to the core workflow.

Completeness5/5

The tool set covers the full lifecycle of paying a bill: create, set payment method, confirm payment, check status, and cancel if needed. Auth token refresh covers authorization failures, and re-running analyze_bill handles corrections. No obvious gaps that would cause agent failures in the intended use case.

Resources