Skip to main content
Glama

request_datasheet_upload

Request a signed URL to upload a datasheet PDF for a component whose datasheet we don't have. Use this when search_parts / get_part_details / prefetch_datasheets return datasheet_status='no_source' (and a retry didn't help) or 'unsupported'. Free — the upload fee is only charged on confirm_datasheet_upload after we validate the file.

Flow (3 steps):

  1. Call request_datasheet_upload with the MPN, the file's SHA-256, and its byte size. You get back an upload_url, upload_method ('PUT'), upload_headers, and an opaque upload_token.

  2. Upload the PDF directly to the returned URL with curl: curl -X PUT -H 'Content-Type: application/pdf' --data-binary @file.pdf "$UPLOAD_URL" (add any headers from upload_headers).

  3. Call confirm_datasheet_upload with the upload_token. Server verifies the bytes, re-hashes, checks for the MPN on the first page, charges the upload fee (50¢), and queues extraction. Returns document_id + status='pending'.

Validation rules (checked at confirm time, refunded on failure):

  • File must be a valid PDF (magic bytes + parseable).

  • Actual SHA-256 must match expected_sha256.

  • Actual byte size must match size_bytes (±0).

  • MPN or its core stem must appear in the first page text (catches wrong-file uploads). Scanned image-only PDFs will fail this check — upload a text-based PDF.

  • Max 50MB per file. No dev-kit manuals / BOB schematics / app-notes as datasheets — use the matching MPN's actual datasheet.

Uploaded datasheets are scoped to your organization (private). They satisfy read_datasheet, search_datasheets, check_design_fit, and analyze_image for your org's tokens only.

Tokens expire after 15 minutes. If upload fails or times out, just call request_datasheet_upload again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
size_bytesYesSize of the PDF in bytes. Must be ≤ 50_000_000 (50MB) and > 1024.
part_numberYesManufacturer part number the PDF belongs to. Must be a real MPN, not a value or description.
manufacturerNoOptional. Manufacturer name (e.g. 'Texas Instruments') if the MPN alone doesn't disambiguate.
expected_sha256YesLowercase hex SHA-256 of the PDF bytes (64 chars). Used both as the storage key (content-addressed) and to detect tampering. Compute with `shasum -a 256 file.pdf`.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

The description goes far beyond the annotations (readOnlyHint=false, openWorldHint=true, destructiveHint=false) by disclosing token expiry (15 minutes), validation rules and refunds, fee timing (only on confirm), org scoping/privacy, and the exact upload method (PUT with headers). It also explains that uploaded datasheets satisfy other tools' queries. This is rich, honest behavioral context with no contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Despite being long, the description is tightly structured: purpose sentence, trigger conditions, numbered 3-step flow, validation rules, scoping note, and expiry/retry note. Each sentence carries useful information and the structure mirrors the actual workflow. It is front-loaded with the core purpose and then organized logically, earning a 5.

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 must explain return values, and it does: upload_url, upload_method ('PUT'), upload_headers, upload_token. It also covers the full end-to-end process, validation rules, fee, privacy, expiration, and next step (confirm_datasheet_upload). For a tool with 4 params and a multi-step flow, this is complete guidance.

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 baseline is 3. The description adds flow context (e.g., 'You get back an upload_url...') and validation rules that reference parameters (e.g., MPN on first page), but it does not significantly extend the parameter meanings already provided in the schema. The schema already explains expected_sha256 as content-addressed and tamper-detecting, and size_bytes limits. No new parameter semantics are introduced.

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?

The description opens with a specific verb+resource: 'Request a signed URL to upload a datasheet PDF for a component whose datasheet we don't have.' It clearly distinguishes from siblings by naming the exact trigger conditions (datasheet_status='no_source' or 'unsupported') and contrasts with confirm_datasheet_upload. This is a precise, differentiated purpose statement.

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?

The description explicitly states when to use the tool: 'Use this when search_parts / get_part_details / prefetch_datasheets return datasheet_status="no_source" (and a retry didn't help) or "unsupported".' It also provides exclusion guidance (no dev-kit manuals, BOB schematics, app-notes) and a step-by-step flow that clarifies the tool's role versus confirm_datasheet_upload. This is exemplary usage guidance.

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.

TDQS

A4.8/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: search_parts finds parts, search_datasheets searches extracted content, read_datasheet reads sections, analyze_image extracts visual data, compare_parts batches comparisons, find_alternative finds substitutes, check_design_fit validates specs, prefetch/check/manage extraction status, and request/confirm handle uploads. The descriptions cross-reference each other to further eliminate ambiguity.

Naming Consistency5/5

All 12 tools follow the verb_noun snake_case pattern consistently (analyze_image, check_design_fit, compare_parts, prefetch_datasheets, request_datasheet_upload, etc.). No mixing of camelCase, verb styles, or vague generic names.

Tool Count5/5

12 tools is ideal for a datasheet-centric server, covering the full workflow from part discovery and datasheet extraction to analysis, validation, comparison, and upload. The count is neither bloated nor thin, and every tool earns its place.

Completeness5/5

The tool surface is comprehensive for the domain: part search, spec-based semantic search, detailed part data, datasheet reading (section/search), image analysis, design-fit checking, part comparison, alternative finding, extraction lifecycle management, and manual datasheet upload (request+confirm). No obvious dead ends or critical missing operations.