Skip to main content
Glama

Confirm Payment

confirm_payment_intent
Destructive

Final step: submit the bill for payment, after a card has been set. You must have confirmed the amount with the user first (amount_to_pay may be partial) and quote their confirmation in user_amount_statement - do not call this until you have asked. If analyze_bill reported a need for extra information, supply it in extra_infos or submission will fail. Use entered_account / entered_provider only to correct a mis-extracted value. Pass the user's current refresh_token (from analyze_bill or a prior confirm) - do not guess.

Args:
    confirm_input: identifiers, the amount to pay, contact info and any extra info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirm_inputYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "ConfirmInput": {
      -    "properties": {
      -      "amount_to_pay": {
      -        "description": "The amount the user has chosen to pay - this is what gets charged. May be a partial payment (less than the bill's full balance). Use the amount the user agreed to when the bill was analyzed, unless they have since changed it.",
      -        "title": "Amount To Pay",
      -        "type": "number"
      -      },
      -      "auth_token": {
      -        "description": "authorization token attached to the user as obtained when submitting the bill, searching for a biller or getting a new auth token",
      -        "pattern": "^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$",
      -        "title": "Auth Token",
      -        "type": "string"
      -      },
      -      "bill_id": {
      -        "description": "identifier for the specific bill that was provided as a result of a bill extraction",
      -        "pattern": "^[a-zA-Z0-9]{10}$",
      -        "title": "Bill Id",
      -        "type": "string"
      -      },
      -      "email": {
      -        "description": "The user's real email, used to send them payment-status updates. You MUST ask the user for it (or reuse an email they gave earlier in this conversation) and confirm the spelling. NEVER invent, guess, or derive it from their name or the bill - a made-up email means the user gets no updates and could send their payment notifications to a stranger.",
      -        "maxLength": 254,
      -        "pattern": "^[a-zA-Z0-9]+([a-zA-Z0-9._%+-]*[a-zA-Z0-9])?@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
      -        "title": "Email",
      -        "type": "string"
      -      },
      -      "entered_account": {
      -        "anyOf": [
      -          {
      -            "pattern": "^(([A-Za-z0-9\\s\\*\\.\\-#]{1,20})|(N/A))$",
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "(optional) if the user wishes to change the value extracted for the account by the bill analysis or provided during maual creation, provide the new value here",
      -        "title": "Entered Account"
      -      },
      -      "entered_provider": {
      -        "anyOf": [
      -          {
      -            "maxLength": 50,
      -            "minLength": 2,
      -            "pattern": "^(([a-zA-Z0-9 \\-\\_.,'&]+)|(N/A))$",
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "(optional) if the user wishes to change the provider name extracted by bill analysis or use during manual bill creation provide the new value here",
      -        "title": "Entered Provider"
      -      },
      -      "extra_infos": {
      -        "default": {},
      -        "description": "dictionary of information provided by the user as {<fieldname1>:<value1> , <fieldname2>:<value2> ,...}",
      -        "patternProperties": {
      -          "^[a-zA-Z0-9_]{2,20}$": {
      -            "anyOf": [
      -              {
      -                "maxLength": 50,
      -                "minLength": 2,
      -                "pattern": "^(([a-zA-Z0-9 \\-\\_.,'&]+)|(N/A))$",
      -                "type": "string"
      -              },
      -              {
      -                "pattern": "^(([A-Za-z0-9\\s\\*\\.\\-#]{1,20})|(N/A))$",
      -                "type": "string"
      -              },
      -              {
      -                "pattern": "\\d{1,2}\\s?(/|-)\\s?\\d{1,2}\\s?(/|-)\\s?\\d{4}",
      -                "type": "string"
      -              }
      -            ]
      -          }
      -        },
      -        "title": "Extra Infos",
      -        "type": "object"
      -      },
      -      "fee_approved": {
      -        "description": "True if any fees on the payment have been disclosed to the user and they accepted them",
      -        "title": "Fee Approved",
      -        "type": "boolean"
      -      },
      -      "phone": {
      -        "default": "2223334444",
      -        "description": "phone number for the user (use the default if you do not have a real one)",
      -        "pattern": "^(\\+?1[\\s.\\-]?)?(\\([2-9]\\d{2}\\)|[2-9]\\d{2})[\\s.\\-\\\\\\/]?\\d{3}[\\s.\\-\\\\\\/]?\\d{4}$",
      -        "title": "Phone",
      -        "type": "string"
      -      },
      -      "refresh_token": {
      -        "description": "Refresh token obtained when the user was created during a bill analysis or as input to a previous confirm_payment_intent tool call in previous bill payment sessions",
      -        "pattern": "^r:[a-z0-9]{32}$",
      -        "title": "Refresh Token",
      -        "type": "string"
      -      },
      -      "user_amount_statement": {
      -        "description": "Required proof that you asked the user and they confirmed the amount: quote what the user actually said about how much to pay (e.g. 'pay the full 150' or 'just pay 50 this month'). You MUST have confirmed amount_to_pay with the user before calling this - never invent this.",
      -        "maxLength": 200,
      -        "minLength": 3,
      -        "title": "User Amount Statement",
      -        "type": "string"
      -      },
      -      "user_id": {
      -        "description": "identifier for the user that was provided as a result of bill extraction",
      -        "pattern": "^[a-zA-Z0-9]{10}$",
      -        "title": "User Id",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "user_id",
      -      "bill_id",
      -      "auth_token",
      -      "refresh_token",
      -      "amount_to_pay",
      -      "user_amount_statement",
      -      "email",
      -      "fee_approved"
      -    ],
      -    "title": "ConfirmInput",
      -    "type": "object"
      -  }
      -}
    • removedInput schema / properties / confirm_input / $ref
      Removed value: -"#/$defs/ConfirmInput"
    • addedInput schema / properties / confirm_input / properties
      Added value: +{
      +  "amount_to_pay": {
      +    "description": "The amount the user has chosen to pay - this is what gets charged. May be a partial payment (less than the bill's full balance). Use the amount the user agreed to when the bill was analyzed, unless they have since changed it.",
      +    "title": "Amount To Pay",
      +    "type": "number"
      +  },
      +  "auth_token": {
      +    "description": "authorization token attached to the user as obtained when submitting the bill, searching for a biller or getting a new auth token",
      +    "pattern": "^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$",
      +    "title": "Auth Token",
      +    "type": "string"
      +  },
      +  "bill_id": {
      +    "description": "identifier for the specific bill that was provided as a result of a bill extraction",
      +    "pattern": "^[a-zA-Z0-9]{10}$",
      +    "title": "Bill Id",
      +    "type": "string"
      +  },
      +  "email": {
      +    "description": "The user's real email, used to send them payment-status updates. You MUST ask the user for it (or reuse an email they gave earlier in this conversation) and confirm the spelling. NEVER invent, guess, or derive it from their name or the bill - a made-up email means the user gets no updates and could send their payment notifications to a stranger.",
      +    "maxLength": 254,
      +    "pattern": "^[a-zA-Z0-9]+([a-zA-Z0-9._%+-]*[a-zA-Z0-9])?@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
      +    "title": "Email",
      +    "type": "string"
      +  },
      +  "entered_account": {
      +    "anyOf": [
      +      {
      +        "pattern": "^(([A-Za-z0-9\\s\\*\\.\\-#]{1,20})|(N/A))$",
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "description": "(optional) if the user wishes to change the value extracted for the account by the bill analysis or provided during maual creation, provide the new value here",
      +    "title": "Entered Account"
      +  },
      +  "entered_provider": {
      +    "anyOf": [
      +      {
      +        "maxLength": 50,
      +        "minLength": 2,
      +        "pattern": "^(([a-zA-Z0-9 \\-\\_.,'&]+)|(N/A))$",
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "description": "(optional) if the user wishes to change the provider name extracted by bill analysis or use during manual bill creation provide the new value here",
      +    "title": "Entered Provider"
      +  },
      +  "extra_infos": {
      +    "default": {},
      +    "description": "dictionary of information provided by the user as {<fieldname1>:<value1> , <fieldname2>:<value2> ,...}",
      +    "patternProperties": {
      +      "^[a-zA-Z0-9_]{2,20}$": {
      +        "anyOf": [
      +          {
      +            "maxLength": 50,
      +            "minLength": 2,
      +            "pattern": "^(([a-zA-Z0-9 \\-\\_.,'&]+)|(N/A))$",
      +            "type": "string"
      +          },
      +          {
      +            "pattern": "^(([A-Za-z0-9\\s\\*\\.\\-#]{1,20})|(N/A))$",
      +            "type": "string"
      +          },
      +          {
      +            "pattern": "\\d{1,2}\\s?(/|-)\\s?\\d{1,2}\\s?(/|-)\\s?\\d{4}",
      +            "type": "string"
      +          }
      +        ]
      +      }
      +    },
      +    "title": "Extra Infos",
      +    "type": "object"
      +  },
      +  "fee_approved": {
      +    "description": "True if any fees on the payment have been disclosed to the user and they accepted them",
      +    "title": "Fee Approved",
      +    "type": "boolean"
      +  },
      +  "phone": {
      +    "default": "2223334444",
      +    "description": "phone number for the user (use the default if you do not have a real one)",
      +    "pattern": "^(\\+?1[\\s.\\-]?)?(\\([2-9]\\d{2}\\)|[2-9]\\d{2})[\\s.\\-\\\\\\/]?\\d{3}[\\s.\\-\\\\\\/]?\\d{4}$",
      +    "title": "Phone",
      +    "type": "string"
      +  },
      +  "refresh_token": {
      +    "description": "Refresh token obtained when the user was created during a bill analysis or as input to a previous confirm_payment_intent tool call in previous bill payment sessions",
      +    "pattern": "^r:[a-z0-9]{32}$",
      +    "title": "Refresh Token",
      +    "type": "string"
      +  },
      +  "user_amount_statement": {
      +    "description": "Required proof that you asked the user and they confirmed the amount: quote what the user actually said about how much to pay (e.g. 'pay the full 150' or 'just pay 50 this month'). You MUST have confirmed amount_to_pay with the user before calling this - never invent this.",
      +    "maxLength": 200,
      +    "minLength": 3,
      +    "title": "User Amount Statement",
      +    "type": "string"
      +  },
      +  "user_id": {
      +    "description": "identifier for the user that was provided as a result of bill extraction",
      +    "pattern": "^[a-zA-Z0-9]{10}$",
      +    "title": "User Id",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / confirm_input / required
      Added value: +[
      +  "user_id",
      +  "bill_id",
      +  "auth_token",
      +  "refresh_token",
      +  "amount_to_pay",
      +  "user_amount_statement",
      +  "email",
      +  "fee_approved"
      +]
    • addedInput schema / properties / confirm_input / title
      Added value: +"ConfirmInput"
    • addedInput schema / properties / confirm_input / type
      Added value: +"object"
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark this as destructive (destructiveHint=true). The description adds valuable behavior context: it requires a card to be set, warns that submission fails without extra info, and instructs not to guess refresh_token. It does not contradict annotations and supplements them with practical failure conditions.

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?

The description is reasonably concise and front-loaded with the primary purpose, followed by critical prerequisites and constraints. Some redundancy (e.g., 'do not call this until you have asked' repeated in the user_amount_statement explanation) could be trimmed, but overall it is efficiently structured.

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 tool's complexity (nested object, output schema present), the description covers prerequisites (card set, user confirmation), failure conditions (extra_infos), and special field handling (entered_account/entered_provider, refresh_token). It omits details about return values, but an output schema exists, so this is acceptable.

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

Parameters3/5

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

The schema provides rich descriptions for all parameters (e.g., user_amount_statement, refresh_token, entered_account), so the baseline is 3. The tool description only gives a high-level summary of confirm_input ('identifiers, the amount to pay, contact info and any extra info') without adding new parameter-level meaning, thus meeting but not exceeding the baseline.

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 'Final step: submit the bill for payment' with a specific verb (submit) and resource (bill), and distinguishes it from siblings by framing it as the final step after bill analysis (referencing analyze_bill). This makes the tool's purpose unambiguous.

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 explicit conditions for use: 'do not call this until you have asked' about the amount, 'If analyze_bill reported a need for extra information, supply it in extra_infos or submission will fail', and guidance to use correction fields only for mis-extracted values. This clear when-to-use and when-not-to-use guidance exceeds the baseline.

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