Skip to main content
Glama

Detect e-invoice format

detect_invoice
Read-onlyIdempotent

Identify the format, syntax, profile/customization and country standard of an e-invoice file. Cheap first step before validating.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
contentNoInvoice XML (UBL, CII, XRechnung, Peppol BIS, ZUGFeRD/Factur-X XML, KSeF FA(3)) as text
content_base64NoA ZUGFeRD / Factur-X PDF (or any invoice file) as base64, when the invoice is not plain XML

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description usefully adds the cost/ordering trait and hints at return content by enumerating the detected dimensions. However, with zero required parameters it never says what happens when both content and content_base64 are omitted, nor how precedence works when both are supplied.

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 short sentences, zero filler, with the core action front-loaded and the usage hint trailing. Every clause contributes either purpose or guidance.

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 is simple, has no output schema, no nested objects, and full schema coverage, so the description does not need to explain return values in depth and does enumerate the detection dimensions. The remaining gap is the absence of any note on argument precedence or the no-argument case, which matters because both parameters are optional.

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 both parameters are already documented with format hints and the "when the invoice is not plain XML" condition for base64. The description adds nothing about the two parameters and does not resolve that they are alternative inputs rather than cumulative ones. Baseline 3 applies when the schema carries the load.

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?

A specific verb ("Identify") applied to a specific resource ("e-invoice file") with the exact dimensions returned enumerated: format, syntax, profile/customization, country standard. It partially differentiates from siblings by positioning itself as a pre-validation step, but does not clarify its boundary against parse_invoice, which an agent could reasonably confuse it with.

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?

"Cheap first step before validating" gives both ordering guidance (call before validate_invoice) and a cost signal that makes the tradeoff explicit. It stops short of naming the alternative tool outright or stating when-not-to-use, so an agent must still infer that parse_invoice is the heavier follow-up.

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.