add_option
ChatGPTAdd one way of settling a question, when a new variant comes up after the question was opened: "keep the pile and test it", "redistribute on P37 and P39". Idempotent on the name: the same words return the option already listed. Ten options per question at most. Returns optionId and created; the option is retained later by record_decision or update_option.
apply_template
ChatGPTOpen the questions of a template in a dossier, with their options, and file every clause that resolves in the corpus as a reference under its question. A clause the organization cannot read is written into the question as something to establish. Applying twice opens nothing twice. Tell the user which questions were opened and which clauses are missing.
attach_entry
ChatGPTFile a piece of evidence under a question, and optionally under one of its options, or take it out with questionId null. This is how the unclassified evidence of load_dossier gets sorted: read it, find the question it answers, file it. A decision cannot be moved: it belongs to its question. Filing where it already is changes nothing.
delete_option
ChatGPTRemove an option from a question. The evidence filed under it stays on the question, unfiled from the option. Irreversible: the user is asked to confirm through the client before anything is removed, unless confirmed is true because they already did in the conversation. Only when the user asked for it.
delete_question
ChatGPTDelete a question from a dossier. Its evidence stays in the dossier, unfiled; its options, its comments and its decision entry go with it. Irreversible: the user is asked to confirm through the client before anything is deleted, unless confirmed is true because they already did in the conversation. A question that stopped mattering is closed with resolve_question, not deleted; delete only a question opened by mistake, and only when the user says so.
draft_deliverable
ChatGPTOpen the document a dossier produces (project basis, use agreement, geotechnical report, verification note) and get its plan: one section per chapter, each with a path, a title, a hint of what belongs there, its state (gap, current, stale: a source moved, the reason says which) and an excerpt of what is already written. The plan is the office template of that kind when the organization validated one, otherwise the plan Stratta proposes. Also returns the decisions of the dossier with their ids, so write_section can cite them, and the site id when there is one. Calling it again on the same dossier and kind returns the same document, never a second one. Then read the skill of that kind (get_skill) and fill the sections with write_section.
get_boreholes
ChatGPTRead the boreholes a site scan found, nearest first, with their logged strata (depth interval, description, period), depth, year, SIA 261 ground class when logged, water table when logged, and links to the cantonal documents. Call it after get_site_context when the question turns on what the ground is actually made of. Each borehole is one observation at one point: quote it with its distance, never interpolate between two of them, and never derive a design value from a layer description.
get_cross_refs
ChatGPTReturn the references one section makes: to other clauses, annexes, figures and tables of the same norm, and to other norms. Norms and regulations often spread the rule, the coefficient and the exception across separate clauses and documents, so following a reference is often what separates a correct answer from an incomplete one. Each reference says whether it is resolvable in this corpus (listed first) and names the target section; read each relevant target with get_section.
get_dossier_activity
ChatGPTRead the history of a dossier, most recent first: who did what and when, from the app or from an agent, each line with the question or the entry it concerns. Call it when the user asks what changed since they last looked, or who took a decision. One page at a time; when nextCursor is present, call again with it as cursor. Lines are written in French at the time of the act, as the app shows them.
get_figure
ChatGPTReturn one figure of a norm as an image: diagrams, charts, standard cross-sections. Call it when the figure carries the rule and describing it in words would lose the content. The figure identifier comes from the figures array of get_section.
get_groundwater_contours
ChatGPTRead the cantonal piezometric contours the scan stored around a site: for each contour the aquifer name, the water table elevation in metres above sea level and the source layer. Cantons that publish none return an empty list and say whether the reading happened. A contour is the canton's interpretation of an aquifer, not a measurement at the site: prefer a water table logged in a nearby borehole (get_boreholes) when one exists, and quote a contour with its name.
get_methodology
ChatGPTRead the working contract this server expects an agent to follow: how to walk a norm from its table of contents down to a clause, how to cite what it reads, and when to record something in a project dossier. Use this at the start of a conversation that will rely on the documents of the organization; its rules hold for the rest of that conversation.
get_profile
ChatGPTReturn the profile behind this connection: a stable opaque id and the organization the connection reads from. Used by the host to tell several connected accounts apart; to check the workspace, call whoami.
get_question
ChatGPTRead one question in full: its wording, status, assignee and due date, its options with their ids and descriptions, its decision, its evidence with every citation field (norm, section path, page, edition, attachment and page) and the option each piece argues for, and the comments left on the question and on those entries, each with its author. Evidence comes one page at a time; when nextCursor is present, call again with it as cursor. Call it before adding to a question, so nothing already filed is filed twice.
get_section
ChatGPTReturn one section as a Markdown document: its text with the LaTeX formulas and tables where the norm prints them, its figures, the cross-references it carries and the sections below it, with the exact path and page range. This is what gets quoted: call it before stating any technical claim taken from a norm, and cite [CODE section path, p. N]. A clause number that is not a node (9.5.2.1) resolves to its nearest heading, whose text carries the clause. A long section comes in windows of maxChars; when truncated is true, call again with the offset given.
get_site
ChatGPTRead a site sheet as the app shows it: every fact with its stable key, its status (established, indicative, absent, uncovered), its source with the date the data was current, the official notice and attribution when the source carries one, and the scan with each source and whether it answered. get_site_context is the summary shaped for an answer; call this when you need to quote a source line, cite a fact key in save_finding, or tell the user which source failed. Facts are registers, never a geotechnical study.
get_site_context
ChatGPTRead what a site scan found, grouped by topic, each value with its source and the date THE DATA was current. Returns two separate lists: what the registers settled, and what they could NOT settle, with the reason. Report the second list to the user in full: it is what a bid has to budget for. Never derive a design value (friction angle, bearing capacity, modulus) from a geological description returned here; state what the register says and that a local investigation is required.
get_site_section
ChatGPTRead the geological section drawn on a site sheet: the axis from A to B, the corridor width, the measured terrain line, the modelled bedrock top, the geology bands sampled along the axis, and the boreholes inside the corridor with their logged strata, projected on the axis. Call it when the question is about what lies along a line rather than at a point. Without an axis drawn in the app, it says so and returns no lines. Nothing is interpolated between boreholes.
get_skill
ChatGPTRead one skill in full: Markdown with its front matter (name, description) and its steps, rules and output shape. Use this when a task matches a skill from list_skills; the skill describes how the office does it. The organization version wins over the Stratta version of the same name, because it carries the office plan and wording. Returns null when no skill has that name.
get_subtree
ChatGPTReturn the section tree below one path, each node with its summary and page range. This is the step between the table of contents and reading: it shows what a chapter contains without loading its text. Use maxDepth to bound it; a tree larger than maxNodes loses its deepest levels and says so with truncated: true.
get_toc
ChatGPTReturn the table of contents of one norm as a tree of path, title, summary and page range. Pass maxDepth 1 for the chapter list, which is enough to choose where to descend; deeper levels return the whole outline and fill the context. Descend with get_subtree, read with get_section.
ingest_attach_cross_ref
ChatGPTAttach a cross-reference from a section to another norm or clause. Idempotent on the target and the reference text.
ingest_attach_formula
ChatGPTAttach a LaTeX formula to a section. Idempotent on the formula number: attaching the same number twice updates the formula instead of doubling it.
ingest_attach_table
ChatGPTAttach a structured table to a section: headers plus rows of cells. Idempotent on the table number.
ingest_create_document
ChatGPTCreate a draft norm document in the workspace. Returns the documentId every later ingest_* call needs. The organization must hold the rights to the document it deposits.
ingest_create_sections
ChatGPTInsert sections into a draft document, up to 200 per call. Parent links resolve through parentNodeId within the batch and the sections already inserted. Returns a map of nodeId to sectionId; use those ids to attach formulas, tables, figures and cross-references.
ingest_delete
ChatGPTDelete a document of your own organization with all its sections, figures, tables, formulas and cross-references. Irreversible; use it before re-ingesting a norm. The user is asked to confirm through the client before anything is deleted, unless confirmed is true because they already did in the conversation. Reserved to owners and administrators.
ingest_normalize_cross_refs
ChatGPTScan every section of a document and add the cross-references to other norms found in its text that are not recorded yet; existing ones are kept. Idempotent; run it after the sections are in.
ingest_publish
ChatGPTPublish a draft document so the read tools can serve it. The server first scores how much of the norm was ingested (text per page, pages under a chapter, empty leaves, enrichment) and refuses below 30/100 with the reasons: fix the ingestion rather than retry. Pass force true only when the user confirms the document really is that short. Returns the score and its flags; show them to the user.
ingest_status
ChatGPTCheck whether a norm (by code) already exists in the workspace, how many sections it has and its coverage score (how much of the norm actually made it in). Use this before creating a document, so a norm is not ingested twice.
ingest_upload_figure
ChatGPTUpload a figure image (base64) and attach it to a section in one call. PNG, JPEG or WebP, 8 MB at most.
list_attachments
ChatGPTList the project attachments of one dossier: the site reports, borehole logs, meeting minutes and data sheets the user uploaded. Returns for each its id, name, type, page count and extraction status. Use this when a question on the project may rest on what the office uploaded; read_attachment opens one, and a piece is cited like a clause.
list_dossiers
ChatGPTList the project dossiers of the organization, most recently touched first, with the count of entries and of open questions. Call it when the user names a project or asks what they were working on: a dossier that already exists is reloaded, never recreated.
list_exports
ChatGPTList the verification notes and journals exported from a dossier, most recent first, each with its kind, its SHA-256 hash, its size, the trusted timestamp when one was obtained, the methodology version in force and who exported it. The file itself is downloaded from the dossier page; this tells the user whether a note exists and lets them check a hash they were sent.
list_norms
ChatGPTList the norms and reference documents (standards, laws, regulations) published in the signed-in organization, with code, year, title, language and coverage (how much of the norm was ingested). Use this when a question may be settled by the documents of the organization and the norm is not yet known: a norm absent from this list cannot be read here. A demo entry is fictional and never a technical reference; a sparse entry carries a notice to relay.
list_questions
ChatGPTList the questions of one dossier, one page at a time, with what the dossier page shows and load_dossier leaves out: status, assignee, due date, author, dates, the options with their ids and the title of the decision when there is one. Filter by status to read only what is still open. Use load_dossier to resume a project; use this to work through the questions one by one, then get_question on the one that matters. When nextCursor is present, call again with it as cursor.
list_site_neighbours
ChatGPTList the other site sheets of the organization within a radius of this one, nearest first, with the distance, the geological unit their own scan established and whether it is the same as here, and the dossier that carries them with its counts of open and decided questions. This is what the public registers cannot say: the office already worked three hundred metres away. Nothing is interpolated: these are links to dossiers to reload, not values.
list_site_overlays
ChatGPTList the areas the site map draws around the point: polluted sites, natural hazard zones and water protection sectors read from the canton, each with whether it covers the site point or how many metres away it stops, its area and its layer. Coordinates are left out unless asked for. Call it after get_site_context when a constraint is near and the user asks how near; the sheet answers at the point, this answers in the radius.
list_site_photos
ChatGPTList the photos the engineer uploaded on a site sheet: name, position in LV95 when the photo carries one (from its EXIF data or placed by hand), shooting direction, the instant the camera recorded, and the note written on it. No image is returned and no link: the photo is looked at in the app. Call it to know what was observed on site and when, before writing an observation.
list_sites
ChatGPTList the site sheets of the organization, most recently touched first, each with the dossier it belongs to, the municipality and canton, the search radius and the status of its current scan. Call it when the user names a site or an address rather than a dossier, or to find the siteId of a sheet opened from the app; a dossier row from list_dossiers also carries its siteId.
list_skills
ChatGPTList the procedures an agent follows for a repeatable task: drafting the project basis or the use agreement, writing the terrain chapter of a report, instructing a type of structure, preparing a review, the verification note. Two sources: the skills Stratta ships and the ones this organization wrote; an organization skill with the same name replaces the Stratta one. Call it before drafting a document or starting such a task, then get_skill on the one that fits.
list_templates
ChatGPTList the checklists the organization wrote for its types of case: each is a set of questions with the clauses they rest on. Use this when a new project may match a type of case the office already wrote down; apply_template opens all its questions at once.
load_dossier
ChatGPTReload a dossier: its questions with their evidence, options and decisions, open questions first, then the evidence not yet filed under a question, then the comments a colleague left. Use this when the user returns to a project already named: the decisions already taken are there. The name is enough; the id is optional.
open_dossier
ChatGPTOpen a project dossier, or return the one that already carries that name: calling it twice with the same name never creates a duplicate. Open one when the user works on a named project and there is something worth keeping (a question to settle, a retained value, an assumption, a site observation); not for a passing lookup. Returns dossierId and created.
open_norm_reader
ChatGPTOpen the norm reader: the norms of the signed-in organization, each with its table of contents and its clauses, browsed by the person. Opened by the person from the side panel or the sidebar, never by the model.
open_question
ChatGPTOpen one question to settle in a dossier, before gathering evidence for it: "can pile P38 be kept?", "which friction angle do we retain?". A question is the unit of work; the evidence saved with save_finding and the eventual record_decision hang off it. One question per thing to settle, never a list of eight in one body. Idempotent on the title: the same wording returns the question already open. Name the options on the table when there are several. Returns questionId and created.
read_attachment
ChatGPTRead the text of a project attachment as a Markdown document, page by page. from and to bound the pages, maxChars the characters; when truncated is true, call again with from set to nextPage. A scan without a text layer says so. Cite what you read as [name, p. N] and file it with save_finding using attachmentId and attachmentPage.
record_decision
ChatGPTUse this when the user has settled a point: records the decision in one line, why, and the clause it rests on. Pass questionId when the question already exists; otherwise pass dossierId and question (what is settled, in one line) and the question is opened on the spot, already decided. Name the retained option when the question listed some; put the number in value and set confidence when the decision is a value. Meant for decisions the user confirmed, not for conclusions of the agent alone. Returns entryId.
resolve_question
ChatGPTClose a question that stopped mattering without a decision (the variant was abandoned, the request withdrawn), or reopen one with resolved false. The question stays in the dossier with its evidence. To settle a question with an answer, call record_decision instead. Only when the user says so.
save_finding
ChatGPTUse this when a piece of evidence turns up during the work: records it in a dossier, one at a time rather than in a batch at the end. Kinds: reference (what a norm says; always give normCode, sectionPath and page, or it is not a reference), hypothesis (the value the user retains and why, value in value and reasoning in detail), observation (what the site, a borehole or a survey showed, with the date). One clause, one value or one fact per call, in one or two sentences. Pass questionId to file it under the question it serves; without it the entry waits unclassified. Set confidence whenever a value is at stake: established, judgement or to_confirm. Questions go through open_question and decisions through record_decision, not here.
scan_site
ChatGPTCollect what public Swiss registers know about a building site: municipality, parcel, ground elevation, geology, nearby boreholes with their strata, polluted sites, groundwater protection, natural hazards, noise sensitivity. Give a Swiss address; it is geocoded server-side against swisstopo, so do not pass coordinates you inferred. Open the dossier first with open_dossier: one site per dossier. The scan runs in the background and takes a few seconds; read the result with get_site_context. It is a survey of public registers, never a geotechnical study.
search_corpus
ChatGPTFull-text search across every norm the organization can read, grouped by norm, heading hits from any norm ahead of body hits. Use this when the question does not name its norm: it tells which norms speak of the subject before any table of contents is opened. Same matching as search_in_norm. Returns, per norm, its code and title and a few hits; continue with get_section on the paths that look relevant.
search_in_dossier
ChatGPTFull-text search over the attachments of one dossier, accents and case ignored, matching per term. Returns the attachment, the page and a snippet for each hit; read the page with read_attachment before quoting it.
search_in_norm
ChatGPTFull-text search inside one norm, ranked, a hit in a heading outranking a hit in the body. Use it when the table of contents suggests no obvious section. Matching is per term, not per substring, in the language of the norm: search "charges" in a French document, not "loads"; accents and case do not matter. A clause number as keyword returns that clause. Returns paths, titles and snippets; read the promising ones with get_section.
show_citations
ChatGPTUse this when an answer rests on clauses read with get_section and the person should be able to check them: shows those clauses as cards they can open against the norm, once per answer, in the order they were cited. It reads nothing new and does not replace get_section; only clauses actually read belong in it.
update_entry
ChatGPTCorrect a piece of evidence or a decision in place: its wording, its value, its confidence, or the citation (norm, section path, page, edition) when the wrong clause was cited. Pass only the fields to change; pass page null to clear it. The kind and the question do not change here (attach_entry moves an entry). Only when the user asked for the correction; never rewrite what a colleague wrote without saying so.
update_option
ChatGPTRename or describe an option of a question, or mark it as the one retained. Retaining one option releases the others: a choice has one answer. Retaining here does not settle the question; call record_decision for that, which names the retained option itself. Pass only the fields to change. Only when the user asked for it.
update_question
ChatGPTReword a question, rewrite what is at stake, assign it to a member of the organization by e-mail address, or set its due date. Pass only the fields to change; pass null to clear the assignee or the due date. Status changes go through record_decision and resolve_question, not here. Only when the user asked for the change.
whoami
ChatGPTReport which organization this connection reads from, the signed-in role, the plan name and how many norms are available. Use it to confirm the connection points at the intended workspace before starting, or when a norm the user expects is missing.