Skip to main content
Glama

mark_client_invoice_paid

Destructive

Mark an issued client invoice as paid after explicit confirmation. Requires a strict calendar-valid paidDate in YYYY-MM-DD format. This updates the accounts-receivable invoice record only; it never creates or moves an Income row. Record the actual payment separately or link an existing Income row.

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": {
      "invoiceId": "<invoiceId>",
      "paidDate": "<paidDate>"
    },
    "name": "mark_client_invoice_paid"
  }
}

Input Schema

NameRequiredDescriptionDefault
paidViaNoOptional payment method or source, such as bank transfer or check.
paidDateYesCalendar-valid payment date in YYYY-MM-DD format.
invoiceIdYesStable invoice ID from list_client_invoices.
paidAmountNoOptional amount received.

Output Schema

NameRequiredDescriptionDefault
statusYes
messageYes
paidViaYes
successYes
paidDateYes
invoiceIdYes
paidAmountYes
invoiceNumberNo
incomeRowCreatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / properties / paidDate / format
      Removed value: -"date"
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "incomeRowCreated": {
      +      "const": false,
      +      "type": "boolean"
      +    },
      +    "invoiceId": {
      +      "type": "string"
      +    },
      +    "invoiceNumber": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "paidAmount": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "paidDate": {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    "paidVia": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "const": "paid",
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "invoiceId",
      +    "status",
      +    "paidDate",
      +    "paidAmount",
      +    "paidVia",
      +    "incomeRowCreated",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "description": "Standard ExpenseBot tool result envelope. `message` is the human-readable summary the AI cites; `data` is the structured payload (totals, breakdowns, ids, etc.). On failure, `success` is false and `error` carries a code/message/hint triple.",
      -  "properties": {
      -    "data": {
      -      "additionalProperties": true,
      -      "description": "Structured payload. Shape varies per tool — common keys: total, breakdown, comparison, sampleMeta, ids, expenseId, reportId, signupUrl, results.",
      -      "type": "object"
      -    },
      -    "error": {
      -      "additionalProperties": true,
      -      "description": "Present only when success === false.",
      -      "properties": {
      -        "code": {
      -          "type": "string"
      -        },
      -        "hint": {
      -          "type": "string"
      -        },
      -        "message": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "message": {
      -      "description": "Human-readable result text. Always present on success; prefer rendering this verbatim before any further reasoning.",
      -      "type": "string"
      -    },
      -    "sampleMeta": {
      -      "additionalProperties": true,
      -      "description": "Set when the underlying dataset was truncated. isTruncated=true means the agent saw a sample of `sampleCount` of `totalCount` rows; aggregate totals are still accurate.",
      -      "properties": {
      -        "isTruncated": {
      -          "type": "boolean"
      -        },
      -        "sampleCount": {
      -          "type": "integer"
      -        },
      -        "totalCount": {
      -          "type": "integer"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "success": {
      -      "description": "False on tool errors; check before reading `data`.",
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  4. Changed1 schema field changed
    • addedInput schema / properties / paidDate / format
      Added value: +"date"
  5. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the mutating nature is known. The description adds meaningful scope context, namely that only the AR invoice record changes and no Income row is created or moved, plus a confirmation requirement. It still does not say whether the change is reversible or what permissions are needed, which matters for a destructive-marked mutation.

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?

Three sentences, front-loaded with the action and confirmation requirement, followed by the accounting-scope warning. Every sentence carries information, though the paidDate format restatement is mild duplication.

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?

Return values need not be explained because an output schema exists, and the definition covers the mutation's blast radius, its prerequisites, and what it deliberately does not touch. Reversibility and permission requirements are the remaining gaps for a destructive-flagged tool.

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 description coverage is 100%, so the schema already documents all four parameters including paidDate format and paidVia examples. The description only restates the paidDate format and says nothing about paidAmount or paidVia, so it adds no meaning beyond the schema. Baseline 3 applies.

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: mark an issued client invoice as paid. It also delimits scope against the income tools in the sibling list by saying it never creates or moves an Income row, so the agent can distinguish it from add_income 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a real precondition (after explicit confirmation) and a clear usage boundary: record the actual payment separately or link an existing Income row. It stops short of naming the specific sibling tool to use for the payment side, so the routing is directional rather than explicit.

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.