Skip to main content
Glama
cmendezs

mcp-einvoicing-de

Build Mls Message

build_mls_message

Generate a base64-encoded MLS response for electronic invoices. Specify response code (AB/AP/RE) and references to acknowledge, accept, or reject a source document.

Instructions

Build a document-level MLS response and return it base64-encoded.

For per-line responses, build the document directly with mcp_einvoicing_core.peppol.mls.build_mls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mls_idYesThe ``cbc:ID`` of this MLS document.
issue_dateYesISO date string, e.g. "2026-08-23".
issue_timeNoOptional ISO time string, e.g. "12:00:00Z".
descriptionNoOptional human-readable response text.
sender_valueYesSending Access Point's endpoint value.
response_codeYes"AB" (Acknowledged), "AP" (Accepted), or "RE" (Rejected).
receiver_valueYesReceiving endpoint value.
sender_scheme_idYesICD scheme of the sending Access Point's endpoint.
receiver_scheme_idYesICD scheme of the receiving endpoint (normally the original message's SBDH ``MLS_TO`` scheme).
status_reason_codeNoOptional: "SV", "BV", "BW", or "FD" (required by the Schematron when response_code is "RE").
document_reference_idYesThe SBDH ``InstanceIdentifier`` of the source message this MLS reports on.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

A4.2/5.0
Behavior3/5

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

There are no annotations, so the description carries the burden. It discloses the key output behavior (base64-encoded) and the document-level limitation, but it does not describe error behavior, side-effect profile, or validation behavior. That is a meaningful gap, though the build-and-return phrasing implies a pure function.

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 main action and output encoding, then a compact routing note for the alternative. No 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 an 11-parameter tool with full schema coverage and an output schema, the description answers selection, scoping, and return encoding. It does not define 'per-line' or connect to validate_mls_message, but those are minor given the schema and sibling names.

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%, and the description adds no parameter-level detail. Baseline 3 is appropriate because the schema fully documents all 11 parameters and required response codes.

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?

The description uses a specific verb ('Build') with a specific resource ('document-level MLS response') and states the return encoding. It explicitly distinguishes this tool from the per-line path by naming the direct builder, so an agent can separate it from siblings like validate_mls_message.

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?

It explicitly scopes the tool to document-level responses and tells the agent to use mcp_einvoicing_core.peppol.mls.build_mls for per-line responses. This is direct when/when-not guidance with an alternative. It could elaborate on per-line terminology, but the routing is unambiguous.

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