@stratta/mcp 0.9.8 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/dist/tools/dossier.d.ts +48 -4
- package/dist/tools/dossier.js +130 -51
- package/dist/tools/read.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -167,15 +167,17 @@ settings come from environment variables — see [`.env.example`](./.env.example
|
|
|
167
167
|
| `get_figure` | Retrieve a figure inline (base64 ImageContent) + public URL. |
|
|
168
168
|
| `get_cross_refs` | Outgoing cross-refs from a section to other norms. |
|
|
169
169
|
|
|
170
|
-
**Dossier** (
|
|
171
|
-
|
|
172
|
-
| Tool | Purpose
|
|
173
|
-
| ------------------ |
|
|
174
|
-
| `list_dossiers` | Your organisation's dossiers, most recently touched first, with open counts.
|
|
175
|
-
| `open_dossier` | Open a project's dossier, creating it if needed. Idempotent on the name.
|
|
176
|
-
| `
|
|
177
|
-
| `
|
|
178
|
-
| `
|
|
170
|
+
**Dossier** (7 tools — keep what was decided on a project):
|
|
171
|
+
|
|
172
|
+
| Tool | Purpose |
|
|
173
|
+
| ------------------ | ---------------------------------------------------------------------------------------- |
|
|
174
|
+
| `list_dossiers` | Your organisation's dossiers, most recently touched first, with open-question counts. |
|
|
175
|
+
| `open_dossier` | Open a project's dossier, creating it if needed. Idempotent on the name. |
|
|
176
|
+
| `open_question` | Open one question to settle, with optional named options. Idempotent on the title. |
|
|
177
|
+
| `save_finding` | Record one piece of evidence: a cited article, a retained value and why, an observation. |
|
|
178
|
+
| `record_decision` | Settle a question with a decision the engineer has confirmed, and the retained option. |
|
|
179
|
+
| `load_dossier` | Reload everything: questions with their evidence and decisions, open ones first. |
|
|
180
|
+
| `resolve_question` | Close a question without a decision, or reopen one. The evidence stays. |
|
|
179
181
|
|
|
180
182
|
A dossier is read, annotated, reviewed and exported from
|
|
181
183
|
[stratta.ch/dossiers](https://stratta.ch/dossiers).
|
package/dist/tools/dossier.d.ts
CHANGED
|
@@ -4,14 +4,34 @@ export declare const openDossier: import("./define.js").ToolDef<{
|
|
|
4
4
|
name: z.ZodString;
|
|
5
5
|
reference: z.ZodOptional<z.ZodString>;
|
|
6
6
|
}>;
|
|
7
|
+
export declare const openQuestion: import("./define.js").ToolDef<{
|
|
8
|
+
dossierId: z.ZodString;
|
|
9
|
+
title: z.ZodString;
|
|
10
|
+
body: z.ZodOptional<z.ZodString>;
|
|
11
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
+
}>;
|
|
7
13
|
export declare const saveFinding: import("./define.js").ToolDef<{
|
|
14
|
+
title: z.ZodString;
|
|
15
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
16
|
+
value: z.ZodOptional<z.ZodString>;
|
|
17
|
+
confidence: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
established: "established";
|
|
19
|
+
judgement: "judgement";
|
|
20
|
+
to_confirm: "to_confirm";
|
|
21
|
+
}>>;
|
|
22
|
+
normCode: z.ZodOptional<z.ZodString>;
|
|
23
|
+
sectionPath: z.ZodOptional<z.ZodString>;
|
|
24
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
normEdition: z.ZodOptional<z.ZodString>;
|
|
8
26
|
dossierId: z.ZodString;
|
|
27
|
+
questionId: z.ZodOptional<z.ZodString>;
|
|
9
28
|
kind: z.ZodEnum<{
|
|
10
29
|
reference: "reference";
|
|
11
30
|
hypothesis: "hypothesis";
|
|
12
31
|
observation: "observation";
|
|
13
|
-
question: "question";
|
|
14
32
|
}>;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const recordDecision: import("./define.js").ToolDef<{
|
|
15
35
|
title: z.ZodString;
|
|
16
36
|
detail: z.ZodOptional<z.ZodString>;
|
|
17
37
|
value: z.ZodOptional<z.ZodString>;
|
|
@@ -23,13 +43,16 @@ export declare const saveFinding: import("./define.js").ToolDef<{
|
|
|
23
43
|
normCode: z.ZodOptional<z.ZodString>;
|
|
24
44
|
sectionPath: z.ZodOptional<z.ZodString>;
|
|
25
45
|
page: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
normEdition: z.ZodOptional<z.ZodString>;
|
|
47
|
+
questionId: z.ZodString;
|
|
48
|
+
retainedOption: z.ZodOptional<z.ZodString>;
|
|
26
49
|
}>;
|
|
27
50
|
export declare const loadDossier: import("./define.js").ToolDef<{
|
|
28
51
|
dossierId: z.ZodOptional<z.ZodString>;
|
|
29
52
|
name: z.ZodOptional<z.ZodString>;
|
|
30
53
|
}>;
|
|
31
54
|
export declare const resolveQuestion: import("./define.js").ToolDef<{
|
|
32
|
-
|
|
55
|
+
questionId: z.ZodString;
|
|
33
56
|
resolved: z.ZodOptional<z.ZodBoolean>;
|
|
34
57
|
}>;
|
|
35
58
|
export declare const dossierTools: (import("./define.js").ToolDef<{}> | import("./define.js").ToolDef<{
|
|
@@ -37,12 +60,30 @@ export declare const dossierTools: (import("./define.js").ToolDef<{}> | import("
|
|
|
37
60
|
reference: z.ZodOptional<z.ZodString>;
|
|
38
61
|
}> | import("./define.js").ToolDef<{
|
|
39
62
|
dossierId: z.ZodString;
|
|
63
|
+
title: z.ZodString;
|
|
64
|
+
body: z.ZodOptional<z.ZodString>;
|
|
65
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
|
+
}> | import("./define.js").ToolDef<{
|
|
67
|
+
title: z.ZodString;
|
|
68
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
69
|
+
value: z.ZodOptional<z.ZodString>;
|
|
70
|
+
confidence: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
established: "established";
|
|
72
|
+
judgement: "judgement";
|
|
73
|
+
to_confirm: "to_confirm";
|
|
74
|
+
}>>;
|
|
75
|
+
normCode: z.ZodOptional<z.ZodString>;
|
|
76
|
+
sectionPath: z.ZodOptional<z.ZodString>;
|
|
77
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
normEdition: z.ZodOptional<z.ZodString>;
|
|
79
|
+
dossierId: z.ZodString;
|
|
80
|
+
questionId: z.ZodOptional<z.ZodString>;
|
|
40
81
|
kind: z.ZodEnum<{
|
|
41
82
|
reference: "reference";
|
|
42
83
|
hypothesis: "hypothesis";
|
|
43
84
|
observation: "observation";
|
|
44
|
-
question: "question";
|
|
45
85
|
}>;
|
|
86
|
+
}> | import("./define.js").ToolDef<{
|
|
46
87
|
title: z.ZodString;
|
|
47
88
|
detail: z.ZodOptional<z.ZodString>;
|
|
48
89
|
value: z.ZodOptional<z.ZodString>;
|
|
@@ -54,10 +95,13 @@ export declare const dossierTools: (import("./define.js").ToolDef<{}> | import("
|
|
|
54
95
|
normCode: z.ZodOptional<z.ZodString>;
|
|
55
96
|
sectionPath: z.ZodOptional<z.ZodString>;
|
|
56
97
|
page: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
normEdition: z.ZodOptional<z.ZodString>;
|
|
99
|
+
questionId: z.ZodString;
|
|
100
|
+
retainedOption: z.ZodOptional<z.ZodString>;
|
|
57
101
|
}> | import("./define.js").ToolDef<{
|
|
58
102
|
dossierId: z.ZodOptional<z.ZodString>;
|
|
59
103
|
name: z.ZodOptional<z.ZodString>;
|
|
60
104
|
}> | import("./define.js").ToolDef<{
|
|
61
|
-
|
|
105
|
+
questionId: z.ZodString;
|
|
62
106
|
resolved: z.ZodOptional<z.ZodBoolean>;
|
|
63
107
|
}>)[];
|
package/dist/tools/dossier.js
CHANGED
|
@@ -3,17 +3,24 @@ import { api } from '../client.js';
|
|
|
3
3
|
import { requireApiKey } from '../auth.js';
|
|
4
4
|
import { defineTool } from './define.js';
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The seven dossier tools: how the work survives the conversation.
|
|
7
7
|
*
|
|
8
8
|
* Everything else here reads a norm. These write down what was decided with
|
|
9
9
|
* it, so the next conversation starts where the last one stopped and a human
|
|
10
10
|
* can review it in the app.
|
|
11
11
|
*
|
|
12
|
+
* A dossier is a set of QUESTIONS. Each question holds the evidence gathered
|
|
13
|
+
* for it, the options on the table and, once the engineer has confirmed it, a
|
|
14
|
+
* decision. The question is the unit of work: it is what gets assigned,
|
|
15
|
+
* reviewed and closed. The first model was a flat journal, and the one real
|
|
16
|
+
* dossier it produced held a single "question" with eight sub-questions in its
|
|
17
|
+
* body — unassignable, unanswerable one at a time, unreadable.
|
|
18
|
+
*
|
|
12
19
|
* The descriptions carry more instruction than the read tools do, on purpose.
|
|
13
20
|
* An agent left to guess will either record nothing — and the feature is dead
|
|
14
21
|
* — or record every sentence it produces, which buries the three decisions
|
|
15
22
|
* that mattered. `get_methodology` tells it when to open a dossier; these tell
|
|
16
|
-
* it what is worth putting in one.
|
|
23
|
+
* it what is worth putting in one, and in what shape.
|
|
17
24
|
*/
|
|
18
25
|
const write = { readOnlyHint: false, openWorldHint: false };
|
|
19
26
|
const readOnly = { readOnlyHint: true, openWorldHint: false };
|
|
@@ -21,10 +28,57 @@ const dossierId = z
|
|
|
21
28
|
.string()
|
|
22
29
|
.min(1)
|
|
23
30
|
.describe('Dossier id returned by open_dossier or list_dossiers.');
|
|
31
|
+
const questionId = z
|
|
32
|
+
.string()
|
|
33
|
+
.min(1)
|
|
34
|
+
.describe('Question id returned by open_question or load_dossier.');
|
|
35
|
+
/** The fields a piece of evidence or a decision carries. */
|
|
36
|
+
const entryFields = {
|
|
37
|
+
title: z
|
|
38
|
+
.string()
|
|
39
|
+
.min(1)
|
|
40
|
+
.max(200)
|
|
41
|
+
.describe('The fact in one line, as an engineer would write it in a report. One clause, one value or one observation; not a theme.'),
|
|
42
|
+
detail: z
|
|
43
|
+
.string()
|
|
44
|
+
.max(4000)
|
|
45
|
+
.optional()
|
|
46
|
+
.describe('The reasoning, in one or two sentences: why this value, what it rests on, what disagreed. Required in practice for a hypothesis.'),
|
|
47
|
+
value: z
|
|
48
|
+
.string()
|
|
49
|
+
.max(120)
|
|
50
|
+
.optional()
|
|
51
|
+
.describe('The retained value WITH its unit, e.g. "30°", "1,25 kN/m²".'),
|
|
52
|
+
confidence: z
|
|
53
|
+
.enum(['established', 'judgement', 'to_confirm'])
|
|
54
|
+
.optional()
|
|
55
|
+
.describe('How firm the value is. See the tool description.'),
|
|
56
|
+
normCode: z
|
|
57
|
+
.string()
|
|
58
|
+
.max(40)
|
|
59
|
+
.optional()
|
|
60
|
+
.describe('Norm this comes from, e.g. "SIA 267".'),
|
|
61
|
+
sectionPath: z
|
|
62
|
+
.string()
|
|
63
|
+
.max(60)
|
|
64
|
+
.optional()
|
|
65
|
+
.describe('Exact section path, e.g. "9.5.2.1".'),
|
|
66
|
+
page: z
|
|
67
|
+
.number()
|
|
68
|
+
.int()
|
|
69
|
+
.positive()
|
|
70
|
+
.optional()
|
|
71
|
+
.describe('Page in the norm, so a human can verify it in their PDF.'),
|
|
72
|
+
normEdition: z
|
|
73
|
+
.string()
|
|
74
|
+
.max(40)
|
|
75
|
+
.optional()
|
|
76
|
+
.describe('The edition cited, e.g. "2013" or "2020 + rect. 2022", when list_norms gives it.'),
|
|
77
|
+
};
|
|
24
78
|
export const listDossiers = defineTool({
|
|
25
79
|
name: 'list_dossiers',
|
|
26
80
|
title: 'List dossiers',
|
|
27
|
-
description: 'List the dossiers of YOUR organisation, most recently touched first. A dossier is a project record: what was decided, what it rests on
|
|
81
|
+
description: 'List the dossiers of YOUR organisation, most recently touched first. A dossier is a project record: the questions to settle, what was decided, what it rests on. Call this when the user mentions a project by name, or asks what they were working on. Each row carries the count of entries and of OPEN questions — a dossier with open questions is the one to resume.',
|
|
28
82
|
inputSchema: {},
|
|
29
83
|
annotations: readOnly,
|
|
30
84
|
run: async (client) => ({
|
|
@@ -36,7 +90,7 @@ export const listDossiers = defineTool({
|
|
|
36
90
|
export const openDossier = defineTool({
|
|
37
91
|
name: 'open_dossier',
|
|
38
92
|
title: 'Open a dossier',
|
|
39
|
-
description: "Open the dossier for a project, creating it if it does not exist yet. IDEMPOTENT on the name: calling it twice with the same name returns the same dossier rather than splitting a project's history in two. Call this when the user starts working on a named project and there is something worth keeping — a retained value, an assumption, a site observation
|
|
93
|
+
description: "Open the dossier for a project, creating it if it does not exist yet. IDEMPOTENT on the name: calling it twice with the same name returns the same dossier rather than splitting a project's history in two. Call this when the user starts working on a named project and there is something worth keeping — a question to settle, a retained value, an assumption, a site observation. Do not open one for a passing lookup. Returns { dossierId, created }.",
|
|
40
94
|
inputSchema: {
|
|
41
95
|
name: z
|
|
42
96
|
.string()
|
|
@@ -56,63 +110,89 @@ export const openDossier = defineTool({
|
|
|
56
110
|
reference: args.reference,
|
|
57
111
|
}),
|
|
58
112
|
});
|
|
113
|
+
export const openQuestion = defineTool({
|
|
114
|
+
name: 'open_question',
|
|
115
|
+
title: 'Open a question',
|
|
116
|
+
description: `Open ONE question to settle in a dossier, BEFORE gathering evidence for it. A question is the unit of work: "Can pile P38 be kept?", "Which φ'k do we retain for the fill?", "Is kinematic interaction to be checked?". Evidence saved with save_finding and the eventual record_decision hang off it.
|
|
117
|
+
|
|
118
|
+
ONE QUESTION PER THING TO SETTLE. Never put a list of sub-questions in the body: a question that bundles eight cannot be assigned, answered or closed one at a time. Open eight questions.
|
|
119
|
+
|
|
120
|
+
IDEMPOTENT on the title: reopening the same wording returns the question already open, with its evidence. Name the options on the table in \`options\` when the user or the norm puts several forward ("abandon the pile", "recover it by re-concreting plus integrity tests", "redistribute onto P37/P39"). Returns { questionId, created }.`,
|
|
121
|
+
inputSchema: {
|
|
122
|
+
dossierId,
|
|
123
|
+
title: z
|
|
124
|
+
.string()
|
|
125
|
+
.min(1)
|
|
126
|
+
.max(200)
|
|
127
|
+
.describe('The question in one line, phrased as a question.'),
|
|
128
|
+
body: z
|
|
129
|
+
.string()
|
|
130
|
+
.max(4000)
|
|
131
|
+
.optional()
|
|
132
|
+
.describe('What is at stake and why it is not settled, in two or three sentences. Not a list of sub-questions.'),
|
|
133
|
+
options: z
|
|
134
|
+
.array(z.string().min(1).max(120))
|
|
135
|
+
.max(10)
|
|
136
|
+
.optional()
|
|
137
|
+
.describe('The ways this could be settled, one short name each.'),
|
|
138
|
+
},
|
|
139
|
+
annotations: { ...write, idempotentHint: true },
|
|
140
|
+
run: (client, args) => client.action(api.dossiersApi.openQuestion, {
|
|
141
|
+
apiKey: requireApiKey(),
|
|
142
|
+
dossierId: args.dossierId,
|
|
143
|
+
title: args.title,
|
|
144
|
+
body: args.body,
|
|
145
|
+
options: args.options,
|
|
146
|
+
}),
|
|
147
|
+
});
|
|
59
148
|
export const saveFinding = defineTool({
|
|
60
149
|
name: 'save_finding',
|
|
61
|
-
title: '
|
|
62
|
-
description: `Record ONE
|
|
150
|
+
title: 'Record evidence in a dossier',
|
|
151
|
+
description: `Record ONE piece of evidence in a dossier. Call it as you work, not in a batch at the end — a finding saved when it is made carries the reasoning that produced it.
|
|
63
152
|
|
|
64
153
|
WHAT TO RECORD, by kind:
|
|
65
154
|
- reference: what a norm says, that the project relies on. ALWAYS fill normCode + sectionPath (+ page). If you cannot cite it, it is not a reference.
|
|
66
155
|
- hypothesis: a value the engineer RETAINS, and why. This is the one that matters most in geotechnics, where a retained value is a judgement between disagreeing measurements rather than the output of a formula. Put the number in \`value\` and the reasoning in \`detail\`.
|
|
67
156
|
- observation: what the site, a borehole, or a survey showed. Include the date in \`detail\` when known.
|
|
68
|
-
- question: something not settled. These surface FIRST when the dossier is reloaded, so record them even when you cannot answer — especially then.
|
|
69
157
|
|
|
70
|
-
|
|
158
|
+
KEEP IT SHORT: one clause, one value or one fact per call, in one or two sentences. Three short entries beat one paragraph that mixes the citation, the reasoning and the consequence. A question is NOT recorded here: call open_question. A decision is NOT recorded here: call record_decision.
|
|
159
|
+
|
|
160
|
+
FILE IT: pass \`questionId\` so the entry lands under the question it serves. If you do not yet know which question it serves, save it anyway without one — the engineer files it later.
|
|
71
161
|
|
|
72
162
|
Set \`confidence\` whenever the entry is a value: established (computed or read directly), judgement (the engineer chose it), to_confirm (provisional, needs a test or a check). Confusing those three is the professional fault this field exists to prevent.`,
|
|
73
163
|
inputSchema: {
|
|
74
164
|
dossierId,
|
|
165
|
+
questionId: questionId
|
|
166
|
+
.optional()
|
|
167
|
+
.describe('The question this evidence serves, from open_question or load_dossier. Omit only when you do not know yet.'),
|
|
75
168
|
kind: z
|
|
76
|
-
.enum(['reference', 'hypothesis', 'observation'
|
|
169
|
+
.enum(['reference', 'hypothesis', 'observation'])
|
|
77
170
|
.describe('See the tool description: pick by what the entry IS.'),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
171
|
+
...entryFields,
|
|
172
|
+
},
|
|
173
|
+
annotations: write,
|
|
174
|
+
run: (client, args) => client.action(api.dossiersApi.saveFinding, {
|
|
175
|
+
apiKey: requireApiKey(),
|
|
176
|
+
...args,
|
|
177
|
+
}),
|
|
178
|
+
});
|
|
179
|
+
export const recordDecision = defineTool({
|
|
180
|
+
name: 'record_decision',
|
|
181
|
+
title: 'Record a decision',
|
|
182
|
+
description: `Settle a question with a decision the engineer has CONFIRMED: what was decided, why, and the clause it rests on. The question leaves the open items and keeps its evidence; the decision becomes the entry a reviewer reads first.
|
|
183
|
+
|
|
184
|
+
Only call this once the user has confirmed the decision, never on your own reasoning. Name the retained option in \`retainedOption\` when the question listed some (the name as it was given; an option not listed yet is created). Put the number in \`value\` when the decision is a value, and set \`confidence\`. Returns { entryId }.`,
|
|
185
|
+
inputSchema: {
|
|
186
|
+
questionId,
|
|
187
|
+
retainedOption: z
|
|
89
188
|
.string()
|
|
90
189
|
.max(120)
|
|
91
190
|
.optional()
|
|
92
|
-
.describe('The
|
|
93
|
-
|
|
94
|
-
.enum(['established', 'judgement', 'to_confirm'])
|
|
95
|
-
.optional()
|
|
96
|
-
.describe('How firm the value is. See the tool description.'),
|
|
97
|
-
normCode: z
|
|
98
|
-
.string()
|
|
99
|
-
.max(40)
|
|
100
|
-
.optional()
|
|
101
|
-
.describe('Norm this comes from, e.g. "SIA 261".'),
|
|
102
|
-
sectionPath: z
|
|
103
|
-
.string()
|
|
104
|
-
.max(60)
|
|
105
|
-
.optional()
|
|
106
|
-
.describe('Exact section path, e.g. "14.2".'),
|
|
107
|
-
page: z
|
|
108
|
-
.number()
|
|
109
|
-
.int()
|
|
110
|
-
.positive()
|
|
111
|
-
.optional()
|
|
112
|
-
.describe('Page in the norm, so a human can verify it in their PDF.'),
|
|
191
|
+
.describe('The option that was retained, by name.'),
|
|
192
|
+
...entryFields,
|
|
113
193
|
},
|
|
114
194
|
annotations: write,
|
|
115
|
-
run: (client, args) => client.action(api.dossiersApi.
|
|
195
|
+
run: (client, args) => client.action(api.dossiersApi.recordDecision, {
|
|
116
196
|
apiKey: requireApiKey(),
|
|
117
197
|
...args,
|
|
118
198
|
}),
|
|
@@ -120,7 +200,7 @@ Set \`confidence\` whenever the entry is a value: established (computed or read
|
|
|
120
200
|
export const loadDossier = defineTool({
|
|
121
201
|
name: 'load_dossier',
|
|
122
202
|
title: 'Load a dossier',
|
|
123
|
-
description: 'Reload everything a dossier holds:
|
|
203
|
+
description: 'Reload everything a dossier holds: its questions with their evidence, options and decisions, then the evidence not yet filed under a question, then the comments a colleague left. OPEN QUESTIONS COME FIRST — read them before anything else and tell the user what is still open. Call this whenever the user returns to a project ("reprends le dossier X", "on en était où sur Y") BEFORE answering anything about it, so you build on what was decided instead of deciding it again. Accepts either the id or the name the user uses.',
|
|
124
204
|
inputSchema: {
|
|
125
205
|
dossierId: z
|
|
126
206
|
.string()
|
|
@@ -143,23 +223,20 @@ export const loadDossier = defineTool({
|
|
|
143
223
|
});
|
|
144
224
|
export const resolveQuestion = defineTool({
|
|
145
225
|
name: 'resolve_question',
|
|
146
|
-
title: 'Close
|
|
147
|
-
description: '
|
|
226
|
+
title: 'Close a question',
|
|
227
|
+
description: 'Close a question that stopped mattering WITHOUT a decision: the variant was abandoned, the client withdrew the request, the point became moot. The question stays in the dossier, marked closed, with its evidence. To settle a question with an answer, call record_decision instead. Pass resolved: false to reopen a question. Only call this when the user says so, never on your own reasoning.',
|
|
148
228
|
inputSchema: {
|
|
149
|
-
|
|
150
|
-
.string()
|
|
151
|
-
.min(1)
|
|
152
|
-
.describe('Entry id of the question, from load_dossier.'),
|
|
229
|
+
questionId,
|
|
153
230
|
resolved: z
|
|
154
231
|
.boolean()
|
|
155
232
|
.optional()
|
|
156
|
-
.describe('Defaults to true. Pass false to reopen
|
|
233
|
+
.describe('Defaults to true (close). Pass false to reopen.'),
|
|
157
234
|
},
|
|
158
235
|
annotations: { ...write, idempotentHint: true },
|
|
159
236
|
run: async (client, args) => {
|
|
160
237
|
await client.action(api.dossiersApi.resolveQuestion, {
|
|
161
238
|
apiKey: requireApiKey(),
|
|
162
|
-
|
|
239
|
+
questionId: args.questionId,
|
|
163
240
|
resolved: args.resolved,
|
|
164
241
|
});
|
|
165
242
|
return { ok: true };
|
|
@@ -168,7 +245,9 @@ export const resolveQuestion = defineTool({
|
|
|
168
245
|
export const dossierTools = [
|
|
169
246
|
listDossiers,
|
|
170
247
|
openDossier,
|
|
248
|
+
openQuestion,
|
|
171
249
|
saveFinding,
|
|
250
|
+
recordDecision,
|
|
172
251
|
loadDossier,
|
|
173
252
|
resolveQuestion,
|
|
174
253
|
];
|
package/dist/tools/read.js
CHANGED
|
@@ -44,7 +44,7 @@ export const listNorms = defineTool({
|
|
|
44
44
|
export const getToc = defineTool({
|
|
45
45
|
name: 'get_toc',
|
|
46
46
|
title: 'Get table of contents',
|
|
47
|
-
description: "Get the high-level table of contents for a norm. By default returns only top-level chapters (depth=1) to stay light. Call get_subtree on a specific chapter's path to drill into sections + subsections. Increase maxDepth if you need a wider overview (cost: response size grows fast). Each node has
|
|
47
|
+
description: "Get the high-level table of contents for a norm. By default returns only top-level chapters (depth=1) to stay light. Call get_subtree on a specific chapter's path to drill into sections + subsections. Increase maxDepth if you need a wider overview (cost: response size grows fast). Each node has path, title, summary, pageStart, pageEnd, depth, and children (empty at the maxDepth boundary).",
|
|
48
48
|
inputSchema: {
|
|
49
49
|
norm,
|
|
50
50
|
maxDepth: z
|
|
@@ -76,7 +76,7 @@ export const getToc = defineTool({
|
|
|
76
76
|
export const getSubtree = defineTool({
|
|
77
77
|
name: 'get_subtree',
|
|
78
78
|
title: 'Get subtree',
|
|
79
|
-
description: 'Drill down into a specific chapter or section. Returns the subtree rooted at `path` with optional depth limit (relative to the root). Use this after get_toc to explore one chapter in detail without fetching the entire TOC. Each node has
|
|
79
|
+
description: 'Drill down into a specific chapter or section. Returns the subtree rooted at `path` with optional depth limit (relative to the root). Use this after get_toc to explore one chapter in detail without fetching the entire TOC. Each node has path, title, summary, depth, pageStart, pageEnd, and recursive children.',
|
|
80
80
|
inputSchema: {
|
|
81
81
|
norm,
|
|
82
82
|
path: sectionPath.describe('Section path to root the subtree at, e.g. "14" or "14.2".'),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stratta/mcp",
|
|
3
3
|
"mcpName": "ch.stratta/mcp",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.10.0",
|
|
5
5
|
"description": "MCP server exposing the engineering norms your firm is licensed for (SIA / Eurocodes) to any MCP client, via Stratta TreeRAG.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"author": "SmartFlow <hello@stratta.ch>",
|