Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DATASHEET_LENS_HOMENoThe folder for the central datasheet-lens store. If unset, the default is ~/.datasheet-lens.~/.datasheet-lens

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_partsA

The parts in the store, with their manufacturer and the number of their documents. Gives one line for each part: "MPN (manufacturer): N documents". list_documents gives the documents of a part.

list_documentsA

The documents in the store, or the documents of one part (a concrete part also gets the documents of its base part). Gives one line for each document: its reference (12 characters, for the other tools), the number of pages, the file name, the role or the parts, and the title.

add_documentA

Add a PDF document to the store: copy or download it, build its index and its element map, and link it to its part. Use it when list_documents does not find the datasheet; the URL can come from a distributor tool or from the Datasheet field of a CAD symbol. The element map of a large document can take minutes: a background thread builds it, and the index and the page images are available at once. Gives the document reference, the pages, the size of the index and the state of the element map. Without part, it also gives a rough proposal of the MPN from the text of the PDF; it can be wrong. Read the MPN on page 1 of the original, then call add_document again with part. To put the part into the user project: project_add_part.

get_indexA

The index of a document: the outline (bookmarks or numbered headings) with pages, and the table and figure captions with their page and position. A large document gives only the top outline levels: get_outline gives the entries under a section. Also the pages with no text layer or with images of a low resolution. Start here to find where the content is.

get_outlineA

The outline entries under one section of a document, with pages. Use it for a large document, when get_index gives only the top levels.

search_textA

Find a text in the text layer of one document, or of all documents of a part. Gives one line for each hit: the document reference, the page, the table or figure that holds the line (an element ID) or the region of the line, and the line. Give the element or the region to get_page_image: it costs less than a full page. The page headers and footers are not shown: a last line gives their number. Use it to find the page of a register, a parameter or a pin. Then read the value from the original (get_page_image): the text layer can be wrong.

get_page_mapA

The structure of one page: headings, tables, figures, formulas and captions. Gives one line for each element: its ID (for example p7.T1), its type, its region [x0, y0, x1, y1] in pt (origin at the top left of the page) and its text or caption. Use the IDs with get_element_text and get_page_image. The element map of a large new document can take minutes to build. Until it is complete, the result tells so: then use get_index, search_text and get_page_image with a page or a region.

get_element_textA

The full text of elements from the text layer, with their type, page and region. Use it for headings and paragraphs. Read table values, figures and formulas from get_page_image: the text layer can lose their structure.

list_itemsA

The tables, figures and captions of the whole document. Gives one line for each item: element ID, page, region and caption. Use it to find a table or a figure when you do not know its page.

get_page_imageA

The original as a PNG image: an element, a caption, a region or a full page. Read the values from this image. An element, a caption or a region is rendered at 300 to 600 dpi: prefer them, because a full page costs more input. A full page is correct for a table that fills the page. It is rendered at the resolution that fits max_px. Gives a line with the page, the region, the dpi and the size, and the image.

get_pdf_pagesA

The original pages as a new PDF file. Use it when your client can read a PDF. Gives the file path and the PDF as an embedded resource.

save_factA

Save a value that you read from the original, with its source and your model ID, so that a later session finds it with find_facts. Before you read a value, look for it with find_facts: do not save a value two times. A new fact has the state unchecked. Gives the fact number.

find_factsA

Find values that were read before (save_fact). With part, it searches the documents of the part and of its base part: a concrete MPN also finds the facts of its datasheet. Gives one line for each fact: number, subject, value, column, conditions, source (document, page, element or region), state and author. A fact is not the source of truth: check an important value against the original, then set its state with set_fact_status.

set_fact_statusB

Set the state of a saved fact after you compared it with the original. Gives the fact number and its new state.

project_statusA

The parts and documents of the user project, and the state of the copies in the project folder: missing or changed copies, new files, problems. It changes nothing. Gives one line for each part (MPN, manufacturer, base part, variants) and one line for each document (reference, role, file). A first line can tell about a newer release or a necessary restart of the LLM client: tell the user.

project_syncB

Synchronize the user project with the central store: add the documents that the store links to the project parts, copy the missing copies into the project folder, move the copies into the subfolders of the layout, and import the new PDF files of the folder. A new file gets a part only from the store; for a different file the result proposes a part, and project_add_part assigns it. Gives the changes and the problems.

project_add_partB

Add a part to the user project, with the documents that the store links to it. Then project_sync copies the documents into the project folder. Gives the part and its documents.

part_linksA

Search links for a part: datasheet, price and stock (DigiKey, Mouser, Farnell, LCSC, Octopart, Findchips), and symbol, footprint and 3D model (Component Search Engine, SnapMagic, Ultra Librarian). Use them when the store and the CAD project have no datasheet, and for the CAD files. datasheet-lens does not open these pages: open one with a web tool, or give the links to the user. A datasheet that you find: add_document with its URL. Gives one line for each site.

search_distributorsA

The orderable parts at the enabled distributors, from their official APIs: lifecycle state, stock, prices, package and datasheet URL. A part that is obsolete or discontinued is marked NOT ORDERABLE. Use it to select the concrete MPN of the BOM, and to check that it can be ordered. Each result names its source (the terms of the distributors ask for it). The enabled distributors come from the project file or the global configuration (distributor_status). Each needs a personal API key: for a distributor with no key, the result has a note with the steps for the user. Give the note to the user. With no key at all, the result gives the search links of part_links.

project_availabilityA

The lifecycle state and the stock of each part of the user project at the enabled distributors (official APIs). Gives one line for each part, and a warning for a part that is not orderable (obsolete, discontinued, with the replacement), that the distributor does not have, or that has no stock. Tell the user about each warning, and give the user each note about a missing API key (see search_distributors).

distributor_statusC

The distributors that datasheet-lens asks (from the project file, the global configuration or the default), and if each has an API key (no key values). For a distributor with no key, a note with the steps for the user: give it to the user. The user changes the list with the CLI command "datasheet-lens dist NAME ..." (global) or "datasheet-lens dist --local NAME ..." (this project).

get_ordering_codesA

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.

project_checkB

Compare the project file with the parts of the CAD project, so that the two hold the same parts. Each part with an MPN needs its datasheet, also a passive part with an MPN in its Value. Gives one line for each symbol whose MPN and Value fields name different parts (a conflict in the CAD project), the number of the same parts, and one line for each part that is different (one part with two MPNs), missing (with the documents of the store or the Datasheet field, and the next call; an alternative of a part is missing too) or extra. It changes nothing.

project_update_partA

Change a part of the user project in place: its MPN, base part, category or manufacturer. The part keeps its place in datasheet-lens.toml and its copies (project_remove_part and project_add_part would delete and copy them again). Then project_sync moves a copy when the layout gives it a different subfolder. Gives the part and its documents.

project_remove_partA

Remove a part from the user project, and delete its copies that no other part uses. A file that the user put into the folder (pinned) stays, unless delete_pinned is true. The central store does not change, because other projects can use the part. To change the MPN of a part, use project_update_part. Gives the removed part and the deleted and kept files.

project_remove_documentA

Remove a document from the parts of the user project; the parts stay. The project remembers it (exclude), so that project_sync does not add it again; project_add_part with this document adds it again. The copy is deleted when no part uses it. The central store does not change.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 26 tools

Disambiguation4/5

Most tools have clearly distinct resource+action targets, and descriptions explicitly redirect between similar tools (get_index vs get_outline, get_element_text vs get_page_image, search_distributors vs project_availability). Some boundaries still require careful reading: list_items vs get_page_map vs get_index, and project_status vs project_check vs project_sync could be confused at a glance.

Naming Consistency4/5

The set is predominantly consistent snake_case with predictable verb_noun spacing and a coherent project_ prefix family. Minor deviations exist: noun-only names like part_links and distributor_status, and mixed verb families (get_/save_/find_/set_/add_/search_) that are still readable.

Tool Count2/5

At 26 tools the surface exceeds the 25-tool threshold, which is heavy even for a domain this broad (document ingestion, reading, facts, project lifecycle, distributors). Several lifecycle and distributor tools could plausibly be consolidated or moved to CLI per the descriptions themselves.

Completeness4/5

Coverage is strong: document ingestion (add_document), reading (text, image, index, outline, search, page map), fact capture/verification, project add/update/remove/sync/check, and distributor availability/ordering. Minor gaps remain: no tool to delete a document from the central store, no fact deletion, and no direct CAD file download (delegated to part_links and external tools).

Maintenance

ActivityMaintained
ResponsivenessNo issues