Skip to main content
Glama

request_datasheet_upload

Get a signed URL to upload a missing datasheet PDF for a component. Use when datasheet status is 'no_source' or 'unsupported'.

Instructions

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`.
Behavior5/5

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

Teases out the full 3-step flow, token expiration (15 min), validation rules, scoping (private), and fee structure. Adds significant context beyond annotations (which are simply readOnlyHint=false, openWorldHint=true, destructiveHint=false). No contradictions.

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 lengthy but well-structured with numbered steps and bullet points. Every section adds necessary detail. Could be slightly more concise, but clarity is not sacrificed.

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?

The description covers the entire workflow, edge cases (scanned PDFs, token expiry), and return behavior (upload_url, upload_method, upload_token). No output schema exists, so the description compensates fully.

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 already covers all 4 parameters with descriptions. The description adds value by explaining how to compute expected_sha256 (using shasum) and when manufacturer is needed for disambiguation. Slightly above baseline due to practical guidance.

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 starts with a clear verb+resource: 'Request a signed URL to upload a datasheet PDF'. It specifies the exact context (missing datasheet) and distinguishes from sibling tools like confirm_datasheet_upload.

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 states when to use: when datasheet_status is 'no_source' or 'unsupported' from certain endpoints. Also provides what not to upload (dev-kit manuals, app-notes) and mentions retry logic.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/octoco-ltd/sheetsdata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server