Skip to main content
Glama

get_ordering_codes

Retrieve orderable codes and their page/line locations from a datasheet's text layer to identify concrete MPNs for a BOM; if only a code scheme exists, use the ordering information image.

Instructions

The orderable codes of a datasheet, from its text layer. Gives one line for each code: the code, its page and its line, which in an ordering table gives the package, the packing, the temperature and the state (ACTIVE, NRND ...). Use it to find the concrete orderable MPN for the BOM. A datasheet that gives only a scheme of its codes has no list: read its ordering information (get_page_image). A code of the datasheet is not always sold: check it with a distributor.

Input Schema

NameRequiredDescriptionDefault
documentYesThe document: its reference from list_documents, project_status or add_document (the first 12 characters of its SHA-256). A longer SHA-256 prefix or the numeric document ID also works.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the output granularity (one line per code), the field semantics, and an important edge case (scheme-only datasheets yield no list). It doesn't state what happens on empty/missing text layer or whether results are truncated, which keeps it short of a 5.

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-loaded with the resource and output shape, and each following sentence adds a distinct piece of value (field meaning, alternative route, verification caveat). Slightly dense across six sentences but no filler.

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, so return values needn't be spelled out, yet the description still conveys the practical shape of results. Combined with the alternative-path guidance and verification caveat, nothing an agent needs in order to call it correctly and interpret the result 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?

Only one parameter (document) and schema description coverage is 100%, so the schema already explains accepted identifiers (SHA-256 prefix, numeric ID). The description adds nothing about the document argument, so the baseline 3 applies.

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: extract the orderable codes of a datasheet from its text layer, emitting one line per code with code, page and line. It also tells the agent what those fields mean in an ordering table (package, packing, temperature, state), so the tool is distinguishable from generic text extractors like get_element_text.

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?

Explicitly frames the goal ('use it to find the concrete orderable MPN for the BOM'), names the exclusion case ('a datasheet that gives only a scheme of its codes has no list'), and routes to the alternative ('read its ordering information (get_page_image)'). It even adds a downstream caveat to verify the code with a distributor via search_distributors.

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