Skip to main content
Glama
tracepass-mcp-server

tracepass-mcp-server

by malinoto

TracePass passport lifecycle (irreversible actions)

tracepass_passport_lifecycle
Destructive

Manage digital product passport lifecycle actions: record EU DPP Registry registration, place on market, suspend, undo, or archive passports and products.

Instructions

WARNING: Every action here changes what the public sees or is a legal act, some irreversible. archive permanently removes the public QR code (it 404s forever). record_registration records the economic operator's registration in the production EU DPP Registry and locks the passport's operator and facility identifiers. place_on_market submits a registration to an EN 18222 registry API. The assistant MUST confirm with the user before each call. Use suspend (reversible — public QR shows 'suspended') as the safe alternative to archive when a change might need to be undone; a passport placed on the market cannot be suspended, because it must stay public.

EU DPP REGISTRY: the economic operator registers a battery passport itself, on the EU DPP Registry website under its own EU Login. TracePass prepares what the operator submits (prepare_registry_upi / prepare_registry_upload_file in tracepass_passports) and records what the operator reports; it never submits to the Registry and never verifies the registration. The Registry's acceptance environment is for testing and has no legal effect (record_acceptance_test in tracepass_passports); only a registration in the production environment counts, and that is what record_registration records. The EU DPP Registry does not accept registrations through place_on_market. record_registration and undo_registration need a paid plan, and a connected app (OAuth) must act for an admin or owner.

Actions (pass via action, with args):

  • record_registration — args: { id, placedOnMarketAt? (YYYY-MM-DD), registrationId? (≤200 chars) }. WRITE, battery passports only, published only. Records that the operator has registered this passport in the PRODUCTION EU DPP Registry, as the operator states it: TracePass does not check it with the Registry. Confirm with the user first, and only after the operator has registered on the Registry website. Effects: the passport is marked placed on the market (placeOnMarketStatus "placed", registrationMode "website"), the operator and facility party identifiers are locked (409 operator_locked on a later change), the backup copy is queued and the passport.placed_on_market webhook fires. placedOnMarketAt defaults to today; it may not be in the future or before the passport was first published. registrationId: the identifier the Registry gave, if any. Returns { passport }. Refusals: 400 Validation failed | invalid_date | date_in_future | date_before_publication | registration_id_too_long; 404; 409 not_a_battery | not_published | already_registered. A mistaken record can be undone with undo_registration. Counts 1 write.

  • undo_registration — args: { id, environment: production|acceptance }. WRITE. Undoes a mistaken record. production: removes a registration recorded with record_registration (one made through place_on_market is not undone here), so the passport is no longer marked placed and its operator identifiers unlock; a webhook already delivered is not recalled. acceptance: removes the recorded acceptance test. It changes nothing in the Registry itself. Confirm with the user first. Returns { passport }. 404; 409 nothing_to_undo. Counts 1 write.

  • place_on_market — args: { id }. WRITE, battery passports only, published only. Submits a registration to the EN 18222 registry API configured in the account's registry access settings. This is NOT the way into the EU DPP Registry, which does not accept it: for the EU DPP Registry use prepare_registry_upi / prepare_registry_upload_file and then record_registration. A legal act for the economic operator — confirm with the user first. ASYNCHRONOUS: answers 202 { passport, passportId, status: "placing", dppId } and the registry call follows in the background; read the passport (get) to follow placeOnMarketStatus: placing → placed (placedOnMarketAt, registrationId) or rejected (registrationRejectionReason). To retry a rejected passport, fix the cause and call place_on_market again. Refusals are 409 with a code: not_a_battery | not_published | already_placed (placing or placed) | operator_id_missing (no economic-operator identifier on the account) | registry_not_configured (an admin sets registry access in the dashboard) | registry_host_not_allowed (TracePass does not send registrations to the configured registry address; check the registry URL), registry_not_ready (findings[] lists what stands in the way — run registry_readiness for the structured findings). After placement the passport's party operatorIdentifier / facilityIdentifier are locked (409 operator_locked on a change). Counts 1 write.

  • suspend — args: { id }. Reversible — public QR shows 'suspended'. Refused with 409 passport_placed_on_market once the passport is placed on the market or its registration is under way.

  • suspend_by_serial — args: { serial, gtin? }. Same as suspend, addressed by your serial. 409 ambiguous_serial if the serial isn't unique in your account — pass gtin.

  • archive — args: { id, reason? (recycled|never_placed|duplicate_or_error) }. never_placed is refused (409 reason_contradicts_placement) on a passport placed on the market. IRREVERSIBLE and destructive — confirm with the user first. The public QR permanently 404s. reason is REQUIRED for battery passports (400 reason_required / invalid_reason without a valid one): recycled, never_placed (never placed on the market or put into service), or duplicate_or_error (a duplicate or erroneous record); for other categories it is optional. A passport marked for deletion cannot be archived (409).

  • archive_by_serial — args: { serial, gtin?, reason? }. IRREVERSIBLE and destructive, addressed by your serial — confirm first. Same reason rule as archive. 409 ambiguous_serial if the serial isn't unique — pass gtin.

  • archive_product — args: { id }. Archives a PRODUCT (not a passport). Reversible — this soft-archives the product from the catalogue. Blocked (409) while any non-archived passport still references it — archive those passports first. Not deletion.

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": {
      "action": "<action>"
    },
    "name": "tracepass_passport_lifecycle"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNoArguments for the chosen action; required fields depend on `action` (see each action above).
actionYesWhich lifecycle action to run. All require user confirmation. record_registration (battery, published; records the operator's own registration in the production EU DPP Registry, made on the Registry website; locks the operator identifiers) | undo_registration (undo a mistaken production or acceptance record) | place_on_market (battery, published; submits to an EN 18222 registry API, not accepted by the EU DPP Registry) | suspend (reversible) | suspend_by_serial | archive (IRREVERSIBLE; QR 404s forever; battery passports need reason) | archive_by_serial | archive_product (reversible product archive; blocked while passports reference it).

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. Changed6 schema fields changedv1.25.0
    • changedInput schema / properties / action / description
      Previous value: -"Which lifecycle action to run. All require user confirmation. place_on_market (battery, published; legal EU registry entry) | suspend (reversible) | suspend_by_serial | archive (IRREVERSIBLE; QR 404s forever; battery passports need reason) | archive_by_serial | archive_product (reversible product archive; blocked while passports reference it)."New value: +"Which lifecycle action to run. All require user confirmation. record_registration (battery, published; records the operator's own registration in the production EU DPP Registry, made on the Registry website; locks the operator identifiers) | undo_registration (undo a mistaken production or acceptance record) | place_on_market (battery, published; submits to an EN 18222 registry API, not accepted by the EU DPP Registry) | suspend (reversible) | suspend_by_serial | archive (IRREVERSIBLE; QR 404s forever; battery passports need reason) | archive_by_serial | archive_product (reversible product archive; blocked while passports reference it)."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "place_on_market",
      -  "suspend",
      -  "suspend_by_serial",
      -  "archive",
      -  "archive_by_serial",
      -  "archive_product"
      -]New value: +[
      +  "record_registration",
      +  "undo_registration",
      +  "place_on_market",
      +  "suspend",
      +  "suspend_by_serial",
      +  "archive",
      +  "archive_by_serial",
      +  "archive_product"
      +]
    • addedInput schema / properties / args / properties / environment
      Added value: +{
      +  "description": "undo_registration: which record to undo — production (a registration recorded with record_registration) or acceptance (a recorded acceptance test).",
      +  "enum": [
      +    "production",
      +    "acceptance"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / args / properties / id / description
      Previous value: -"Passport or product id. Required for place_on_market, suspend, archive, archive_product."New value: +"Passport or product id. Required for record_registration, undo_registration, place_on_market, suspend, archive, archive_product."
    • addedInput schema / properties / args / properties / placedOnMarketAt
      Added value: +{
      +  "description": "record_registration: the date the battery was placed on the market, YYYY-MM-DD. Defaults to today; not in the future, not before the passport was first published.",
      +  "type": "string"
      +}
    • addedInput schema / properties / args / properties / registrationId
      Added value: +{
      +  "description": "record_registration: the identifier the EU DPP Registry gave the registration, if any (≤200 chars).",
      +  "type": "string"
      +}
  2. Addedv1.24.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description goes far beyond them: it discloses that archive makes the public QR '404 forever', that record_registration locks operator and facility identifiers (409 operator_locked), that place_on_market is asynchronous (202 'placing' → placed/rejected, followed via get), that webhooks fire and are not recalled on undo, and it enumerates refusal codes per action. This is exactly the mutation-risk context an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The warning and safety framing are correctly front-loaded, and the per-action bullet structure aids scanning. However, the text is very long and repeats itself: the EU DPP Registry paragraph is restated inside the place_on_market bullet, and confirmation/plan requirements appear multiple times. For an eight-action tool the length is partly justified, but the redundancy costs it.

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?

Given eight heterogeneous actions, a nested args object, and irreversible mutations, the description covers preconditions, side effects, async follow-up, failure codes, and reversibility paths. An output schema exists and returns ({ passport }) are only briefly noted, which is appropriate. Nothing an agent needs in order to call this correctly appears 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 the baseline is 3, but the description adds real meaning: placedOnMarketAt 'may not be in the future or before the passport was first published', registrationId is 'the identifier the Registry gave, if any', reason is REQUIRED for battery passports only, and gtin disambiguates a non-unique serial. Most of this is duplicated in the schema property descriptions, which caps it below 5.

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 names each of the eight actions with a specific verb+resource (e.g., 'archive — permanently removes the public QR code', 'place_on_market — submits a registration to an EN 18222 registry API') and states the scope constraint up front ('Every action here changes what the public sees or is a legal act'). It also distinguishes itself from sibling tools by name (prepare_registry_upi / prepare_registry_upload_file in tracepass_passports, registry_readiness), so an agent can route without opening another schema.

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?

Explicit when-to-use and when-not-to-use guidance is present throughout: 'Use suspend ... as the safe alternative to archive', 'The EU DPP Registry does not accept registrations through place_on_market', and 'for the EU DPP Registry use prepare_registry_upi / prepare_registry_upload_file and then record_registration'. Prerequisites (paid plan, OAuth admin/owner, published battery passports only) and mandatory confirmation per call are stated.

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