Skip to main content
Glama

Fund Task

fund_task
Idempotent

ESCROW FLOW ONLY. Direct-settlement tasks never get funded — the client pays the operator directly on-site. Calling this on a direct-settlement task returns 400. Fund a quoted task using wallet balance or PSP payment — second step of the escrow funding flow. Precondition: task must be in Quoted status AND settlementMode='escrow'. If not, call request_task_quote first. Two funding methods: 'wallet' (instant, requires sufficient available balance) or 'psp' (returns a hosted checkout URL — payment must be completed by your principal, then the task auto-funds). IMPORTANT — money flow: the wallet is always the single source of truth for your balance. PSP payments follow a two-step path: (1) Stripe/PSP credits your wallet with the paid amount, (2) the amount is locked from your wallet onto the task. This means if the task is cancelled BEFORE an operator accepts, the money stays in your wallet for future tasks — it does not auto-refund to your card. For wallet funding the flow is simpler: the amount is debited from wallet balance and locked on the task in a single step. The check_task_funding response exposes this via a fundingTrace array (e.g. ["psp_payment_received","wallet_credited","task_locked"]). Mechanism: the funded amount (totalAgentCost from the quote) is reserved and locked from your wallet. Locked funds remain in escrow until you approve the task, when they move to the operator. Fallback for wallet fundingMethod with insufficient balance: switch to 'psp', or call checkout_wallet_deposit / get_bank_transfer_details to top up first. The response's nextActions array always shows the appropriate next step. Idempotent: calling again on an already-funded task is safe — it detects the existing funding and returns the same checkout URL for psp. Next: publish_task after wallet funding. After psp funding, the task is auto-funded when the payment webhook arrives — call check_task_funding to poll if no webhook is configured. Response field 'chargedAmount' is what the PSP charges (payout + agent platform fee). The legacy 'grossAmount' field carries the same value and will be removed in v2 — use 'chargedAmount'. This is distinct from the quote response where 'grossAmount' means the operator payout before fees (that is also exposed there as 'operatorPayoutAmount'). Requires authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyYesYour API key (m2m_...)
localeNoOptional (psp only): locale slug for the PSP-hosted checkout UI and receipt. Supported: en, nl, de, fr, es, es-419, pt, pt-BR, it, pl. Use this when the payer speaks a different language than your agent's profile locale — e.g. pass 'pt-BR' if the URL will be opened by a Brazilian end-user. Defaults to the agent's profile locale, then to browser auto-detect.
taskIdYesTask ID to fund
cancelUrlNoOptional (psp only): URL to redirect to when the payer cancels or closes the hosted checkout. Without this, cancellation falls back to the platform default.
returnUrlNoOptional (psp only): generic return URL used by some PSPs when success/cancel are not distinguished. Most flows should use successUrl + cancelUrl instead.
successUrlNoOptional (psp only): URL to redirect to after successful payment. Defaults to a hosted success page on the Molt2Meet domain.
fundingMethodYesFunding method: 'wallet' (pay from wallet balance) or 'psp' (pay via secure payment provider)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • addedInput schema / properties / locale
      Added value: +{
      +  "default": null,
      +  "description": "Optional (psp only): locale slug for the PSP-hosted checkout UI and receipt. Supported: en, nl, de, fr, es, es-419, pt, pt-BR, it, pl. Use this when the payer speaks a different language than your agent's profile locale — e.g. pass 'pt-BR' if the URL will be opened by a Brazilian end-user. Defaults to the agent's profile locale, then to browser auto-detect.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Despite idempotentHint=true annotation, the description adds substantial behavioral context beyond annotations: detailed money flow for PSP (two-step wallet credit then lock), cancellation behavior (money stays in wallet, no auto-refund), idempotent re-invocation behavior (returns same checkout URL), lock duration until approval, and 400 error on direct-settlement tasks. No annotation contradictions.

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 long but front-loaded with the most critical scope restriction and precondition. Each paragraph covers a distinct aspect (methods, money flow, idempotency, next steps, response fields) without redundancy. Slightly verbose, but the complexity (money handling, PSP nuances) justifies the length.

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?

With no output schema, the description compensates by explaining response fields ('nextActions array', 'chargedAmount' vs legacy 'grossAmount', fundingTrace in check_task_funding), error conditions, preconditions, idempotency, cancellation semantics, and next-step flow. It is comprehensive enough for a money-moving 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?

Schema coverage is 100%, so baseline is 3. The description adds meaningful semantics to fundingMethod ('wallet' instant vs 'psp' hosted checkout URL, requires principal completion, auto-funds), plus fallback behavior for insufficient balance. It does not repeat schema details for locale/URLs but enriches the critical fundingMethod parameter.

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 states a clear verb-resource-scope: 'Fund a quoted task using wallet balance or PSP payment — second step of the escrow funding flow.' It immediately distinguishes from direct-settlement tasks ('ESCROW FLOW ONLY... Calling this on a direct-settlement task returns 400') and positions itself relative to siblings like request_task_quote and publish_task.

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?

Provides explicit when/when-not guidance: precondition 'task must be in Quoted status AND settlementMode='escrow'', direct exclusion of direct-settlement tasks, fallback advice ('switch to 'psp', or call checkout_wallet_deposit / get_bank_transfer_details'), and clear next steps ('Next: publish_task after wallet funding... call check_task_funding to poll').

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

A3.9/5.0
Disambiguation3/5

Most tools have clearly distinct purposes, but there are overlapping pairs like fund_wallet and checkout_wallet_deposit (both create checkout URLs for wallet top-up) and cancel_physical_task vs cancel_task_with_settlement. Detailed descriptions and cross-references help, but the sheer number of similar actions creates misselection risk.

Naming Consistency4/5

Tool names follow a consistent verb_noun snake_case pattern (e.g., get_*, list_*, approve_*). Minor deviations include inconsistent use of 'task' vs 'physical_task' in names and the awkward 'checkout_wallet_deposit', but overall the pattern is predictable.

Tool Count2/5

54 tools is excessive for any server, even a complex platform. While each tool has a role, many are redundant or could be consolidated (e.g., wallet funding tools, multiple approval/cancel variations), making the set feel bloated and hard to navigate.

Completeness4/5

The tool set covers the full task lifecycle, escrow/direct settlement flows, wallet management, webhooks, support, and administrative functions. The only notable gap is the inability to update task details beyond location (description, deadline, etc.) after dispatch, but core workflows are well-covered.