Skip to main content
Glama

settle

<tool_description> Settle pending payments for media buys. Supports manual CSV export, Stripe invoice (Phase 2 stub), and x402 micropayments (Phase 2 stub). </tool_description>

<when_to_use> When a publisher wants to collect earned revenue or an advertiser needs to settle outstanding charges. Use method='manual' for CSV export. Stripe and x402 are stubs (Phase 2). </when_to_use>

<combination_hints> get_campaign_report → settle (after verifying amounts). Filter by media_buy_id, publisher_id, or period. </combination_hints>

<output_format> Settlement totals (gross, platform fee, net), entry count, and method-specific data (CSV for manual). </output_format>

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "method": "<method>"
    },
    "name": "settle"
  }
}

Input Schema

NameRequiredDescriptionDefault
methodYesSettlement method
period_endNoPeriod end (ISO 8601)
media_buy_idNoSettle specific media buy
period_startNoPeriod start (ISO 8601)
publisher_idNoSettle all for a publisher

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / media_buy_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
    • addedInput schema / properties / publisher_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the write semantics (readOnlyHint=false, openWorldHint=true) and non-idempotency, so the bar is lower. The description adds genuinely new behavioral context: two of the three enum methods are stubs that do nothing, and the output includes gross, platform fee, net, and entry count. It does not warn that re-invoking a non-idempotent settlement could double-pay, which is the most consequential behavior left unstated.

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?

Four short labeled blocks, each front-loaded with the operative information: purpose and method support first, then when to use, then sequencing, then return shape. No sentence is filler.

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?

For a money-moving tool with no output schema, the definition supplies an output_format block and disambiguates the stubbed methods, which covers the essentials. The notable gap is repeat-safety risk for a non-idempotent settlement, plus any permission or authorization prerequisites.

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?

Schema coverage is 100%, so the schema already documents all five parameters, making 3 the baseline. The description only adds that media_buy_id, publisher_id, and period act as filters and that 'manual' yields CSV — useful but marginal, with no guidance on how period_start/period_end interact with the ID filters or which combination wins.

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?

States a specific verb and resource ('Settle pending payments for media buys') and immediately enumerates the three supported settlement methods. No sibling tool in the list performs settlement, so an agent can route here confidently without opening the schema.

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?

Explicitly names both triggering situations (publisher collecting revenue, advertiser settling charges) and pairs an alternative with a condition: method='manual' for CSV export, while stripe_invoice and x402 are non-functional Phase 2 stubs. The combination hint (verify amounts via get_campaign_report first) further sequences the call.

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.