Skip to main content
Glama

Record what a supplier calls a product

add_product_supplier_reference
Idempotent

Changes data: records a supplier's own code for one of the organization's products, as the person who connected this app, and records it in the organization's audit log. From then on a line of that supplier's invoice or packing list with that code is read as this product, and lines already on shipments are matched again. It is saved as confirmed, and a catalogue import never replaces it. Use it only when the user asks to map a supplier's code to a product, and say which supplier, code and product before calling it. Repeating a call for the same product, supplier and code changes nothing (a suggested or imported one becomes a confirmed correction); the same code on another product, or with another conversion factor, is refused with an error that says so, so change it in Trackberry. The supplier must be a supplier company of the organization. Only for an organization that keeps a product catalogue. Answers with the product and its supplier_references, each with an id such as "prf_8" that remove_product_supplier_reference needs.

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": {
      "product_id": "<product_id>",
      "supplier_id": "<supplier_id>",
      "reference": "<reference>"
    },
    "name": "add_product_supplier_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault
referenceYesThe supplier's code for the product, such as "OR-2-369". Case, spaces and punctuation do not matter.
product_idYesA product id such as "prd_45", as returned by list_products.
supplier_idYesThe supplier's company id such as "cmp_12", as returned by list_companies.
conversion_factorNoHow many of the organization's units one of the supplier's is, such as 12 for a case of 12. Default 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare mutation, idempotency, closed-world and non-destructive; the description adds the audit-log record and actor, the post-write re-matching of shipment lines, the 'saved as confirmed' state, the rule that catalogue imports never overwrite it, and refusal behaviour (same code on another product or a different conversion factor errors out and must be changed in Trackberry). The idempotency nuance (a repeat is a no-op, or promotes a suggested/imported reference to confirmed) is consistent with idempotentHint=true and clarifies rather than contradicts it.

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 mutation warning ('Changes data:') and then proceeds through effect, usage gate, idempotency, refusals and return value in a logical order. Dense but mostly load-bearing; a few embedded clauses (the actor phrasing, the parenthetical about suggested/imported references) could be tightened without losing meaning.

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?

No output schema exists, yet the description summarises the response (the product and its supplier_references, including a 'prf_8'-style id that the remove tool needs). Combined with prerequisites, conflict behaviour and idempotency, an agent has everything needed to call it and to interpret the result.

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 cross-parameter semantics the schema cannot express: uniqueness of the product/supplier/code triple, the coupling of code with conversion_factor as a conflict condition, and the provenance of product_id and supplier_id. It does not restate per-field formats, which is appropriate since the schema already does.

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 concrete verb and resource: records a supplier's own code for one of the organization's products. It also spells out the downstream effect (invoice/packing-list lines with that code are read as this product) and names the counterpart tool remove_product_supplier_reference, so the agent can distinguish it from siblings without opening a schema.

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 an explicit gate ('Use it only when the user asks to map a supplier's code to a product'), a confirmation obligation ('say which supplier, code and product before calling it'), and a precondition ('Only for an organization that keeps a product catalogue'). It does not point to a sibling for related-but-different intents such as editing an existing reference, so it stops short of full alternative routing.

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