Skip to main content
Glama
machship-mcp

machship-mcp

Get Commercial Invoice PDF

machship_get_commercial_invoice_pdf
Read-onlyIdempotent

Retrieves the commercial invoice PDF for a consignment by ID, supporting international shipment documentation.

Instructions

Returns the commercial invoice PDF for a consignment (used for international shipments). Returns { fileBase64, contentType, sizeBytes }. contentType comes from the response header.

Args:

  • consignmentId (number): Consignment ID

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": {
      "consignmentId": "<consignmentId>"
    },
    "name": "machship_get_commercial_invoice_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
consignmentIdYesConsignment ID

Output Schema

NameRequiredDescriptionDefault
errorsNoValidation errors returned by Machship, if any
objectNoResponse payload from the Machship API

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.1
    • addedInput schema / properties / consignmentId / maximum
      Added value: +9007199254740991
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "errors": {
      +      "anyOf": [
      +        {
      +          "items": {},
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Validation errors returned by Machship, if any"
      +    },
      +    "object": {
      +      "description": "Response payload from the Machship API"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is fully covered. The description adds that the payload is a base64 file plus a response-header-derived contentType, which hints at large binary returns, but it says nothing about size limits, failure modes, or what happens when no invoice exists, and the restated return shape is largely covered by the output schema.

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?

The description is three short, front-loaded lines: purpose, return shape, then parameters. It is efficient overall, though the Args block duplicates the input schema verbatim and could be dropped without loss.

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?

With a single required parameter, full schema coverage, rich annotations, and an existing output schema, the description need only establish purpose and context, which it does. The remaining gap is error/edge-case behavior when a consignment has no commercial invoice, which is minor for a one-parameter read tool.

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 the single consignmentId parameter is already documented in the schema, including its integer type and minimum bound. The description's Args block merely repeats "consignmentId (number): Consignment ID" without adding format, source, or lookup guidance, so the baseline of 3 applies.

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?

"Returns the commercial invoice PDF for a consignment" gives a specific verb (returns) and a precise artifact (commercial invoice PDF), which separates it from sibling PDF tools such as get_consignment_label_pdf, get_dangerous_goods_pdf, and get_special_instructions_pdf. The parenthetical "used for international shipments" narrows the domain further, but no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Used for international shipments" implies when the tool applies, which is more than most PDF getters offer. However, it gives no guidance on prerequisites (e.g. the consignment must already exist or have a commercial invoice attached) and never names alternatives such as machship_upload_commercial_invoice or machship_get_consignment_pdf_file_info.

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

Deploy Server

Other Tools