Skip to main content
Glama

datasheet_fetch

Downloads a datasheet PDF into the workspace and returns its local path so you can read package drawings and recommended land patterns.

Instructions

Download a datasheet PDF into the workspace and return its path.

Read the returned path yourself (the pages with the package drawing and the recommended land pattern); nothing here parses the PDF. The file is kept under <workspace>/datasheets, named by a hash of the URL, with a JSON sidecar recording the URL, part number, SHA-256, size and fetch time, so a second call for the same URL is answered from the cache (cache: "hit") with the same bytes. A cached copy that no longer matches its recorded hash is fetched again.

Refused, with nothing stored: a URL that is not http or https; a file over 50 MB; a server that does not answer within 60 s; and a reply that is not a PDF (no %PDF header), which is what a login or cookie page looks like. For those, download the file in a browser and read the local copy.

Args: url: the datasheet's http or https URL, ideally the manufacturer's own. part_number: recorded in the sidecar, for the citation.

Returns: {ok, path, sidecar, cache, url, final_url, sha256, size, pages, pages_approximate, pages_method, fetched_at}. pages is counted from the page objects in the file without a PDF parser and can be None or off for a compressed file.

Input Schema

NameRequiredDescriptionDefault
urlYes
part_numberNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it discloses the cache location and naming scheme, the JSON sidecar contents, the cache-hit behavior, re-fetch on hash mismatch, and the exact refusal conditions (non-http(s) URL, >50 MB, >60 s timeout, missing %PDF header) with nothing stored. It also notes the page-count limitation for compressed files.

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 front-loaded with purpose, then reading instructions, cache behavior, refusal rules, args, and returns. It is long but most sentences earn their place. The Returns section partially restates an existing output schema and could be trimmed.

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 a fetch tool with no annotations, two parameters, and an output schema, the description covers everything an agent needs: what it produces, where the file lands, caching semantics, failure modes, and sidecar metadata. The output schema handles return shape, and the description adds only useful caveats like pages possibly being None.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate and does: url is described as the http or https URL, ideally the manufacturer's own, and part_number is explained as recorded in the sidecar for the citation. Both parameters gain meaning beyond their bare titles.

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?

The first sentence gives a precise verb and resource: it downloads a datasheet PDF into the workspace and returns its path. The description also explicitly states the non-goal ('nothing here parses the PDF'). It does not name a sibling such as part_fetch or lib_audit_footprint_vs_datasheet, so sibling differentiation is implicit rather than explicit.

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?

The description tells the agent to use the returned path itself and read the package drawing and land pattern pages, and it gives a clear fallback for refused cases: download in a browser and read the local copy. It does not compare against alternative tools like part_fetch or lib_dblib_search, leaving the agent to infer when this tool is preferable.

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