Skip to main content
Glama

Change a document's type and read it again

recategorize_document
Destructive

Deletes data: tells Trackberry a document is a different type than it decided (for example an invoice read as a packing list) and has it read again as that type, as the person who connected this app, and records it in the organization's audit log. Each run is a paid AI extraction that sends the file to an AI provider. What was read from the document is cleared first: its extracted data, and what it had imported into the shipment (a packing list with its pallets, invoice lines, a free-time notice, an inspection report, a booking's route). The new reading is not instant: the document shows processing, then parsed or failed; use get_document_data later. Only admins and owners can do this in Trackberry, and the answer says so for anyone else. Refused, with nothing changed, for a document that is waiting or being read, a file the security scan blocked, a shipment that has arrived, a packing list with pre-allocations (delete those first). In a demo or sample organization nothing is read: the call is recorded in the audit log, the document is unchanged and the answer says simulated true. Limited to 10 re-readings (this and reparse_document together) an hour per connection; do not retry sooner. Use it only when the user asks and says which type; on a copy shared across containers it acts on the original. Answers with the document.

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": {
      "document_id": "<document_id>",
      "document_type": "<document_type>"
    },
    "name": "recategorize_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_idYesA document id such as "doc_45", as returned by list_documents.
document_typeYesThe type to read it as, such as "packing_list", "exporter_invoice" or "transport_document".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / document_type / enum
      Previous value: -[
      -  "packing_list",
      -  "warehouse_receipt",
      -  "transport_document",
      -  "courier_document",
      -  "exporter_invoice",
      -  "transport_invoice",
      -  "proforma_invoice",
      -  "phytosanitary_cert",
      -  "certificate_of_origin",
      -  "other_certificate",
      -  "inspection_report",
      -  "arrival_notice",
      -  "booking",
      -  "pre_alert",
      -  "importer_document"
      -]New value: +[
      +  "packing_list",
      +  "warehouse_receipt",
      +  "transport_document",
      +  "courier_document",
      +  "exporter_invoice",
      +  "transport_invoice",
      +  "proforma_invoice",
      +  "phytosanitary_cert",
      +  "certificate_of_origin",
      +  "other_certificate",
      +  "inspection_report",
      +  "arrival_notice",
      +  "booking",
      +  "pre_alert",
      +  "free_time_terms",
      +  "importer_document"
      +]
  2. Added

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it delivers unusually well: it notes destructive clearing of extracted data and imports, that each run is a paid AI extraction sent to a provider, audit logging, admin/owner permission requirements, demo-org simulation, and a 10-per-hour rate limit. This is substantially more than a bare mutation notice.

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?

Front-loads the destructive consequence ('Deletes data') and then proceeds through cost, effects, timing, permissions, refusals, and limits with almost no filler. It is long and parenthetical-heavy, which slightly hurts scannability for a two-parameter tool.

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?

With no output schema, the description still explains the response (the document, the 'simulated' flag in demo orgs, permission refusal messaging) and the asynchronous processing states. Nothing an agent needs in order to call it correctly or interpret the answer is missing.

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 coverage is 100% and both parameters are fully documented in the schema, so the description only adds examples of types and a note about copies shared across containers acting on the original. That is useful but not essential meaning beyond the schema.

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?

States a specific verb+resource (changes a document's type and has it re-read as that type) and immediately gives a concrete example (an invoice read as a packing list). It also implicitly separates itself from reparse_document by noting the shared rate limit and from get_document_data by pointing there for results.

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: 'Use it only when the user asks and says which type.' It also names when it is refused (document waiting/being read, blocked file, arrived shipment, packing list with pre-allocations) and points to get_document_data later for the outcome, plus an alternative (delete pre-allocations first).

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