Skip to main content
Glama
davidkotler

icount-mcp

by davidkotler

Close document

icount_close_document

Close a document as paid and link it to base documents it settles, such as linking an order to an offer. Use this to finalize accounting documents in iCount.

Instructions

Mark a document as closed/paid, optionally linking it to base documents it settles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docnumYesThe document number as shown in iCount
basedOnNoBase documents this closure settles, e.g. an offer this order fulfills
doctypeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.3.2
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / basedOn / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / basedOn / items / properties / docnum / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  }
      +]
    • addedInput schema / properties / basedOn / items / properties / docnum / description
      Added value: +"The document number as shown in iCount"
    • removedInput schema / properties / basedOn / items / properties / docnum / type
      Removed value: -[
      -  "string",
      -  "number"
      -]
    • addedInput schema / properties / basedOn / items / properties / doctype / enum
      Added value: +[
      +  "invoice",
      +  "invrec",
      +  "receipt",
      +  "refund",
      +  "order",
      +  "offer",
      +  "delivery",
      +  "deal"
      +]
    • addedInput schema / properties / docnum / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  }
      +]
    • addedInput schema / properties / docnum / description
      Added value: +"The document number as shown in iCount"
    • removedInput schema / properties / docnum / type
      Removed value: -[
      -  "string",
      -  "number"
      -]
  2. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

The annotations indicate non-readonly, non-destructive, open-world, non-idempotent. The description aligns: it marks as closed/paid, which is a mutation but not destructive. It adds meaningful context: linking base documents settles them, implying a relationship update. It does not contradict; it clarifies the state transition and the optional linkage, which is beyond what annotations convey.

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?

The description is a single, concise sentence that captures the core functionality and the key optional aspect (linking base documents) without extraneous detail. It is front-loaded with the primary action and outcome. No wasted words.

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 moderate complexity (3 params, nested objects in basedOn), the description is quite complete. It does not describe return values (no output schema), but that is acceptable. It covers the main purpose and the optional behavior of basedOn. It lacks details on edge cases or side effects, but for a closure operation, the description sufficiently informs the agent.

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 67%: doctype and docnum are documented in the schema with descriptions ('The document number as shown in iCount'). The description adds value for 'basedOn' by explaining its purpose ('Base documents this closure settles, e.g. an offer this order fulfills'), which goes beyond the schema's 'Base documents this closure settles'. However, it does not clarify the exact structure of 'basedOn' beyond what schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Mark a document as closed/paid') and the resource ('document'), with a specific outcome. It distinguishes from siblings like icount_cancel_document (cancels vs closes) and icount_convert_document (converts vs closes) implicitly, though it does not explicitly name alternatives. The verb 'Mark' is specific enough to indicate a state change rather than full deletion or creation.

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 gives a clear sense of when to use it: to close a document, optionally linking base documents. It distinguishes from creation and cancellation by context, but it does not explicitly state when not to use it (e.g., for cancellation) or name alternatives. It implies usage in the context of finalizing a document after it is paid or fulfilled.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.