Skip to main content
Glama

Validate invoice records

validate_invoice_records
Read-onlyIdempotent

Processes the structured invoice fields you supply to check missing values, dates, arithmetic, and likely duplicates, then returns the records with derived validation and review fields. Invoice Table does not store the tool input or output after the response.

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": {
      "records": "<records>"
    },
    "name": "validate_invoice_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
recordsYes

Output Schema

NameRequiredDescriptionDefault
recordsYes
summaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "records": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "category": {
      +            "type": "string"
      +          },
      +          "confidence": {
      +            "type": "number"
      +          },
      +          "currency": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "dueDate": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "duplicate": {
      +            "type": "boolean"
      +          },
      +          "duplicateOf": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "filename": {
      +            "type": "string"
      +          },
      +          "invoiceDate": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "invoiceNumber": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "issues": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "poNumber": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "reviewReasons": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "reviewStatus": {
      +            "enum": [
      +              "ready",
      +              "review",
      +              "blocked",
      +              "duplicate"
      +            ],
      +            "type": "string"
      +          },
      +          "subtotal": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "tax": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "total": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "valid": {
      +            "type": "boolean"
      +          },
      +          "vendor": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "warnings": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "filename",
      +          "category",
      +          "duplicate",
      +          "issues",
      +          "warnings",
      +          "confidence",
      +          "valid",
      +          "reviewStatus",
      +          "reviewReasons"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "summary": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "accountingEligibleCount": {
      +          "type": "integer"
      +        },
      +        "arithmeticCheckedCount": {
      +          "type": "integer"
      +        },
      +        "arithmeticMismatchCount": {
      +          "type": "integer"
      +        },
      +        "blockedCount": {
      +          "type": "integer"
      +        },
      +        "duplicateCount": {
      +          "type": "integer"
      +        },
      +        "invoiceCount": {
      +          "type": "integer"
      +        },
      +        "readyCount": {
      +          "type": "integer"
      +        },
      +        "reviewCount": {
      +          "type": "integer"
      +        },
      +        "totalsByCurrency": {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "invoiceCount",
      +        "readyCount",
      +        "reviewCount",
      +        "blockedCount",
      +        "duplicateCount",
      +        "arithmeticCheckedCount",
      +        "arithmeticMismatchCount",
      +        "accountingEligibleCount",
      +        "totalsByCurrency"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "records",
      +    "summary"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior. The description adds meaningful behavioral context beyond that: it discloses the data-retention policy ('does not store the tool input or output after the response') and states that returned records include derived validation and review fields.

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?

Two sentences, front-loaded with the core operation and followed by the retention disclosure. No filler or repetition; each sentence contributes distinct information.

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?

The tool has one input parameter, rich annotations, and an output schema, so the description need not explain return shapes in detail. It covers what the tool does, the checks it performs, and a useful retention caveat. The remaining gap is lack of sibling-routing guidance, which is minor for this low-complexity tool.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It says only that 'structured invoice fields you supply' are processed and lists the validation checks; it does not explain the records array, item fields, constraints, or expected formats. The schema itself defines field names, but the description adds little semantic clarity about the single required parameter.

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 states a clear verb ('Processes') and resource ('structured invoice fields') and enumerates the checks performed (missing values, dates, arithmetic, duplicates). It implicitly contrasts structured input with the text-based sibling, but does not explicitly name or distinguish analyze_invoice_text or export_invoice_records.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description gives no explicit when-to-use guidance, no prerequisites, and no alternatives. An agent can infer that it validates structured invoice records, but there is no direction on when to choose it over analyze_invoice_text or export_invoice_records.

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