Source inventories and assistant-submitted analysis
Assistants and the command line can analyse sources with their own models and describe a corpus's sources with a source inventory. This page is the reference for submitting a reading to Pangur and for staging, activating and rolling back an inventory.
Most analysis is started in the web client and run by Pangur's model. This page covers two advanced routes that run from an assistant connected over MCP, or from the command line: submitting analysis made with the assistant's own model, and describing a corpus's sources with a source inventory. Both write through the same evidence that the corpus views show, so their results appear in the corpus's views like any other reading. The web client has no screen for starting either.
This page assumes you know how analysis works and how to connect an assistant. Every tool named here is listed in MCP tools, and every command in the command-line reference. An assistant must name the project on every call (Assistants and Pangur).
Analysis by an assistant
An assistant such as Claude can read a source with its own model and save the result as a reading in Pangur. Pangur makes no model call of its own for this route, so it costs nothing against your Pangur model allowance and starts no background job. The assistant's model use is billed by its provider under your arrangement with them.
The assistant works through five steps.
- Fetch the units.
analysis_materialsreturns the source's exact units, divided the same way Pangur would divide them (by the document's divisions, a marker, or even sections), with their text and character positions. It returns at most 12 units or 60,000 characters per reply, so the assistant pages through them. Passing acorpus_idbrings that corpus's guidance with the material. The reply also gives the names the project already holds, and fingerprints of the source text and of the division (sourceHashandplanHash). - Check record boundaries, if needed.
plan_analysis_recordsvalidates boundaries where one logical record, such as a long letter, spans several units. - Submit in batches.
submit_analysissaves up to 12 units at a time under a submission key the assistant chooses. Every quotation must be an exact substring of its unit, and Pangur checks each one. Batches are staged, which means they change no corpus view until the submission is finished. - Finish. A final
submit_analysiscall withfinalizeset publishes the reading in one transaction. If some units were never submitted, Pangur refuses to publish unless the assistant passesallow_partial, in which case the reading is marked partial. - Resume if interrupted.
get_analysis_submissionreports which units a submission covers and which are missing, so a later conversation can carry on under the same key.
Published results do not change. Sending the same batch again adds nothing, and to change submitted results the assistant starts a new submission with a new key. Earlier readings, including Pangur's own, are kept, and your corrections are applied to the new reading just as they are to any re-reading.
A viewer in an organisation's project cannot submit analysis.
Places, concepts and context
Three further tools support an assistant's work on a corpus.
update_analysis_context sets a corpus's historical regions and period, together with the rest of its reading guidance. Regions help Pangur choose between places with the same name, for example Aberdeen in Scotland rather than Aberdeen in the United States. The web form has no field for regions.
resolve_analysis_places matches a corpus's places to gazetteer entries in the light of its regions, without a model. It links a place automatically only when one match is uniquely supported, keeps the candidates and reasons for the rest, and leaves untouched any decision a person has made. The assistant calls it repeatedly until no places remain.
suggest_concept proposes a concept for the corpus's Concepts view. Over MCP the concept's words are counted at once, and the blind test described under testing a concept waits until you ask for it in Pangur.
Read-only tools let an assistant explore a corpus as the views do: list_corpora, corpus_records, corpus_network, corpus_timeline, corpus_series, corpus_concepts, corpus_events, item_events, corpus_geography, get_analysis_evidence and reading_sequence. The command line has matching pangur corpus commands, such as pangur corpus records and pangur corpus series.
Source inventories
A source inventory is a complete, fixed description of a corpus's sources, prepared outside Pangur, for example from an edition's apparatus or from a project's own database. It describes the historical readings (each manuscript, edition or supplied text that witnesses a record, with its repository and shelfmark or a bibliographical reference, its text, and how complete that text is), the logical records (the letters or other records the corpus contains, each with the readings that witness it), the attestations (where in a reading a record is attested, with the exact quotation, or a note that the record is known only from an image or a catalogue), photographs of the pages linked to the copies already in your library, each with a note on how the photograph was matched to its place, and any dating assertions that come with the sources.
Pangur pins each reading to its exact words and each attestation to that revision of the words. A historical assertion must quote the reading it rests on, and an editorial summary or commentary cannot supply a historical quotation. Pangur checks these rules when the inventory is staged and refuses an inventory that breaks them, with a message naming the problem.
Staging, activating and rolling back
An inventory changes nothing until it is activated, which happens in stages.
- Stage.
stage_source_inventory(orpangur corpus stage-sources CORPUS MANIFEST_FILE) stores the inventory and returns a receipt with a version. Staging again with the same import key does nothing new. A correction needs a new import key, and Pangur says so if you reuse one for different evidence. - Activate.
activate_source_inventory(orpangur corpus activate-sources CORPUS MANIFEST EXPECTED_VERSION) makes the staged inventory the corpus's live one. Activation sets the corpus's sources to those the inventory names and adds the entities it identifies, but it does not overwrite a name, merge or coordinate that a person has changed. Pangur then asks for a new corpus digest. - Roll back.
rollback_source_inventory(orpangur corpus rollback-sources CORPUS EXPECTED_VERSION) restores the previous inventory.
Activation and rollback each add a revision, and neither deletes the other inventory, any earlier reading or any source text. source_inventories (or pangur corpus source-inventories CORPUS) lists the receipts and can export an inventory's full content.
When activation is refused
Activation succeeds only if nothing relevant has changed since staging. Otherwise Pangur refuses it and asks you to reconcile:
| Message | What changed |
|---|---|
| "The active inventory changed after staging; reconcile before activating." | Another inventory was activated or rolled back. |
| "Analysis or corrections changed after staging; reconcile before activating." | A source was read again or a reading was corrected. |
| "Corpus membership changed after staging; reconcile before activating." | Sources were added to or removed from the corpus. |
| "Reconciliation must map or explicitly exclude every current record…" | The inventory does not account for every record the corpus holds. |
To reconcile, prepare and stage the inventory again against the corpus as it now stands, then activate the new staging.
What the web client shows
The corpus's heading line counts the inventory's records as "source records". Each record has a source reader showing its pinned text, the readings that witness it, its attestations and its photographs.
A viewer in an organisation's project cannot stage, activate or roll back an inventory.
Dating
A dating interpretation records your judgement about when a record or event dates from, with the evidence and reasoning behind it. This page explains the form, the date formats Pangur accepts, and how revisions and exports work.
Drafts, sections and versions
A draft is the writing you plan in Plan and write in Write. This page explains how its sections and versions fit together and how a draft differs from the other documents kept in Research.