Skip to main content
Glama
malinoto

tracepass-mcp-server

by malinoto

TracePass passport parties

tracepass_passport_parties
DestructiveIdempotent

Set or remove a passport’s economic-operator parties by role—manufacturer, importer, recycler, and others—with legal names and required identifiers.

Instructions

Manage the economic-operator parties on a passport — manufacturer, importer, authorisedRepresentative, distributor, recycler, producerResponsibilityOrg. Each party carries a legal name and at least one identifier.

Identifier rules (EN 18219 §6.2–6.5): a party needs at least one of gln, legacyOperatorId, or operatorIdentifier. If both gln and operatorIdentifier (scheme gln) are provided they must agree — a mismatch returns 400. An operatorIdentifier of scheme gln also fills the top-level gln field; facilityIdentifier never does. Typed identifiers (operatorIdentifier / facilityIdentifier) are not set by AI extraction or CSV import.

operatorIdentifier schemes: • iso6523 — { scheme:"iso6523", icd:"<4 digits>", value } — ICD 0199 = LEI (ISO 17442), 0088 = GLN, 0060 = DUNS. • gln — { scheme:"gln", gln:"<13 digits>" } — also fills top-level gln. • did — { scheme:"did", did:"did::" } — syntax-checked only (EN 18219 §6.4.2(b)). • doi — { scheme:"doi", doi:"10./" } — doi:/https://doi.org/ prefix accepted and stripped.

facilityIdentifier schemes: same four; the gln variant also accepts optional extension (GS1 SGLN sub-location).

Actions (pass via action, with args):

  • set — args: { id, role, legalName, gln?, country?, url?, tradeName?, postalAddress?, email?, legacyOperatorId?, operatorIdentifier?, facilityIdentifier? }. Sets or updates one role. tradeName, postalAddress and email are shown on the public passport; for a battery importer they are its Battery Regulation Art. 41(3) details.

  • remove — args: { id, role }. Clears one role. Once a battery passport is placed on the market, a change to a stored operatorIdentifier or facilityIdentifier returns 409 operator_locked; other party edits stay allowed. To correct a locked identifier, the passport is marked for deletion and a new one created.

Input Schema

NameRequiredDescriptionDefault
argsNoArguments for the chosen action; required fields depend on `action`.
actionYesSet (add/replace) or remove an economic-operator party on a passport by its role.

Output Schema

NameRequiredDescriptionDefault
idNoThe resource's TracePass id, when the response is a single entity.
pageNoCurrent page number (list actions).
errorNoMachine-readable error code, when the API rejected the request.
itemsNoThe page of results, when the action is a list.
limitNoPage size (list actions).
totalNoTotal matching records across all pages (list actions).
resultNoWraps a non-object response body (e.g. a QR code string).
messageNoHuman-readable error or status detail, when present.
totalPagesNoTotal number of pages (list actions).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.23.2
    • removedOutput schema / properties / error / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / error / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / message / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / message / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed4 schema fields changedv1.22.0
    • addedInput schema / properties / args / properties / email
      Added value: +{
      +  "description": "Company contact e-mail, not a person's (set, optional). Public.",
      +  "type": "string"
      +}
    • addedInput schema / properties / args / properties / postalAddress
      Added value: +{
      +  "description": "Postal address with a single contact point, one line, max 500 chars (set, optional). Public.",
      +  "type": "string"
      +}
    • addedInput schema / properties / args / properties / tradeName
      Added value: +{
      +  "description": "Registered trade name or registered trade mark, max 200 chars (set, optional). Public.",
      +  "type": "string"
      +}
    • addedInput schema / properties / args / properties / url
      Added value: +{
      +  "description": "Organisation web address (set, optional).",
      +  "type": "string"
      +}
  3. Changed4 schema fields changedv1.19.1
    • addedOutput schema / properties / error / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / error / type
      Removed value: -"string"
    • addedOutput schema / properties / message / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / message / type
      Removed value: -"string"
  4. Changed6 schema fields changedv1.14.1
    • changedInput schema / properties / args / properties / country / description
      Previous value: -"Party country code (set, optional)."New value: +"ISO 3166-1 alpha-2 country code (set, optional)."
    • addedInput schema / properties / args / properties / facilityIdentifier
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Structured facility identifier per EN 18219 §6.2–6.5. Same four schemes as operatorIdentifier; the gln variant also accepts optional `extension` (GS1 SGLN sub-location). Never fills the top-level gln field. Not set by AI extraction.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / args / properties / gln / description
      Previous value: -"GS1 Global Location Number for the party (set, optional)."New value: +"GS1 Global Location Number (13 digits). Strongly recommended for multi-role disambiguation."
    • changedInput schema / properties / args / properties / legacyOperatorId / description
      Previous value: -"Your internal operator id for the party (set, optional)."New value: +"Free-text fallback identifier (VAT, EORI, supplier code). Required when gln and operatorIdentifier are both absent."
    • addedInput schema / properties / args / properties / operatorIdentifier
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Structured operator identifier per EN 18219 §6.2–6.5. Must have `scheme` plus scheme fields. Schemes: iso6523 {icd:\"<4 digits>\", value} | gln {gln:\"<13 digits>\"} | did {did:\"did:<method>:<id>\"} | doi {doi:\"10.<registrant>/<suffix>\"}. scheme gln also fills the top-level gln field; they must match if both are set (400 otherwise). Not set by AI extraction.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / args / properties / role / description
      Previous value: -"Economic-operator role, e.g. manufacturer | importer | distributor | authorised_representative (required)."New value: +"Economic-operator role: manufacturer | importer | authorisedRepresentative | distributor | recycler | producerResponsibilityOrg (required)."
  5. Changed6 schema fields changedv1.7.3
    • addedInput schema / properties / action / description
      Added value: +"Set (add/replace) or remove an economic-operator party on a passport by its role."
    • removedInput schema / properties / args / additionalProperties
      Removed value: -{}
    • changedInput schema / properties / args / description
      Previous value: -"Action-specific arguments — see the description."New value: +"Arguments for the chosen action; required fields depend on `action`."
    • addedInput schema / properties / args / properties
      Added value: +{
      +  "country": {
      +    "description": "Party country code (set, optional).",
      +    "type": "string"
      +  },
      +  "gln": {
      +    "description": "GS1 Global Location Number for the party (set, optional).",
      +    "type": "string"
      +  },
      +  "id": {
      +    "description": "Passport id (required).",
      +    "type": "string"
      +  },
      +  "legacyOperatorId": {
      +    "description": "Your internal operator id for the party (set, optional).",
      +    "type": "string"
      +  },
      +  "legalName": {
      +    "description": "Party legal name. Required for set.",
      +    "type": "string"
      +  },
      +  "role": {
      +    "description": "Economic-operator role, e.g. manufacturer | importer | distributor | authorised_representative (required).",
      +    "type": "string"
      +  }
      +}
    • removedInput schema / properties / args / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "error": {
      +      "description": "Machine-readable error code, when the API rejected the request.",
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "The resource's TracePass id, when the response is a single entity.",
      +      "type": "string"
      +    },
      +    "items": {
      +      "description": "The page of results, when the action is a list.",
      +      "items": {},
      +      "type": "array"
      +    },
      +    "limit": {
      +      "description": "Page size (list actions).",
      +      "type": "number"
      +    },
      +    "message": {
      +      "description": "Human-readable error or status detail, when present.",
      +      "type": "string"
      +    },
      +    "page": {
      +      "description": "Current page number (list actions).",
      +      "type": "number"
      +    },
      +    "result": {
      +      "description": "Wraps a non-object response body (e.g. a QR code string)."
      +    },
      +    "total": {
      +      "description": "Total matching records across all pages (list actions).",
      +      "type": "number"
      +    },
      +    "totalPages": {
      +      "description": "Total number of pages (list actions).",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  6. First observedv1.1.4

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses the 400 returned on gln/operatorIdentifier mismatch, the 409 operator_locked condition after market placement, which fields become public on the passport, and that typed identifiers are never populated by AI extraction or CSV import. This is exactly the operational context the destructive/idempotent hints cannot convey.

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?

Long but deliberately structured with labelled sections and bullets, and the identifier rules are genuinely load-bearing for correct invocation. The action list sits after the identifier rules rather than up front, and several sentences restate what the nested schema already says.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists and annotations cover the safety profile, so the description's remaining burden is mutation semantics and failure modes — both covered (400 mismatch, 409 lock, public-field visibility, non-AI-populated identifiers). Nothing an agent needs to call this correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: the EN 18219 identifier rules, the ICD table (0199=LEI, 0088=GLN, 0060=DUNS), doi prefix stripping, and the side effect that scheme gln fills the top-level `gln` while facilityIdentifier never does. It largely mirrors the nested-schema text, which keeps it from a 5.

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?

Opens with a specific verb+resource ("Manage the economic-operator parties on a passport") and enumerates the exact roles covered, plus the two actions set/remove. The scope is unmistakably about party records rather than general passport fields, but it never names the sibling tool (tracepass_passport_fields) that an agent might reach for instead.

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 concrete per-action guidance (args for `set` vs `remove`), states that `set` both creates and updates a role, and describes the recovery path when an identifier is locked ("the passport is marked for deletion and a new one created"). It stops short of explicit when-not-to-use or sibling alternatives.

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