@graspful/mcp 0.2.3 → 0.2.5

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 CHANGED
@@ -4,9 +4,9 @@
4
4
  [![MCP](https://img.shields.io/badge/MCP-compatible-blue)](https://modelcontextprotocol.io)
5
5
  [![License](https://img.shields.io/npm/l/@graspful/mcp)](https://github.com/willwearing/graspful/blob/main/LICENSE)
6
6
 
7
- MCP server for creating adaptive learning courses. AI agents scaffold, validate, review, and publish courses as YAML knowledge graphs.
7
+ MCP server for creating adaptive learning academies and courses. AI agents scaffold, validate, review, and publish academy manifests, course YAMLs, and brand YAMLs as a connected product.
8
8
 
9
- Part of [Graspful](https://graspful.ai) -- the agent-first adaptive learning platform. Courses are authored as two YAML files (graph structure + content), validated offline, then imported via API.
9
+ Part of [Graspful](https://graspful.ai) -- the agent-first adaptive learning platform. Academies are authored as an academy manifest plus one or more course YAMLs, then paired with a brand YAML for the learner-facing landing page.
10
10
 
11
11
  ## Quick Start
12
12
 
@@ -41,30 +41,34 @@ npx @graspful/cli register
41
41
  export GRASPFUL_API_KEY="gsk_..."
42
42
  ```
43
43
 
44
- ### 3. Build a course
44
+ ### 3. Build an academy
45
45
 
46
46
  ```
47
- graspful_scaffold_course(topic: "Your Topic", estimatedHours: 10)
47
+ graspful_create_academy(topic: "Your Topic")
48
+ → create or author the course YAMLs referenced by the manifest
49
+ graspful_scaffold_course(topic: "Your First Course", estimatedHours: 10)
48
50
  → edit the YAML
49
51
  graspful_validate(yaml: "...")
50
52
  graspful_review_course(yaml: "...")
51
- graspful_import_course(yaml: "...", org: "your-org", publish: true)
53
+ graspful_import_academy(manifestYaml: "...", courseYamls: { "courses/course.yaml": "..." }, org: "your-org", publish: true)
52
54
  ```
53
55
 
54
56
  Scaffold, fill, validate, and review work offline — no account needed. You only need to register before importing or publishing.
55
57
 
56
58
  ## Available Tools
57
59
 
58
- 10 tools. Focused and minimal -- agents degrade above 40 tools.
60
+ 12 tools. Focused and minimal -- agents degrade above 40 tools.
59
61
 
60
62
  | Tool | Description | Auth Required |
61
63
  |------|-------------|:---:|
64
+ | `graspful_create_academy` | Generate an academy plan and manifest scaffold | No |
62
65
  | `graspful_scaffold_course` | Generate a course YAML skeleton with sections, concepts, and prerequisite edges | No |
63
66
  | `graspful_fill_concept` | Add knowledge points and problem stubs to a specific concept | No |
64
67
  | `graspful_validate` | Validate any Graspful YAML against its Zod schema. Auto-detects file type | No |
65
68
  | `graspful_review_course` | Run all 10 mechanical quality checks. Returns a score with failure details | No |
66
69
  | `graspful_describe_course` | Compute course statistics without importing (concept/KP/problem counts, graph depth) | No |
67
70
  | `graspful_create_brand` | Generate brand YAML scaffold for a white-label learning site | No |
71
+ | `graspful_import_academy` | Import academy manifest + course YAMLs. Optionally publish imported courses | Yes |
68
72
  | `graspful_import_course` | Import course YAML into an organization. Creates as draft by default | Yes |
69
73
  | `graspful_publish_course` | Publish a draft course. Runs review gate first -- all 10 checks must pass | Yes |
70
74
  | `graspful_import_brand` | Import brand YAML to create white-label site config | Yes |
@@ -72,6 +76,18 @@ Scaffold, fill, validate, and review work offline — no account needed. You onl
72
76
 
73
77
  ## Tool Reference
74
78
 
79
+ ### `graspful_create_academy`
80
+
81
+ Generate an academy plan and manifest scaffold. Every Graspful product should be modeled as an academy, even if it starts with a single course.
82
+
83
+ If `courseNames` is omitted, the scaffold starts with the four default planning layers: foundations, core structures, operational flows, and applied judgment. It also returns authoring gates for the source material, learner promise, landing-page proof, graph checks, and review before publishing.
84
+
85
+ | Parameter | Type | Required | Description |
86
+ |-----------|------|:---:|-------------|
87
+ | `topic` | string | Yes | Academy topic (e.g., "PostHog TAM") |
88
+ | `courseNames` | string[] | No | Ordered course names for the manifest. Defaults to the four academy planning layers. |
89
+ | `version` | string | No | Academy version string |
90
+
75
91
  ### `graspful_scaffold_course`
76
92
 
77
93
  Generate a course YAML skeleton with sections, concepts, and prerequisite edges. Returns a minimal valid YAML structure with TODO placeholders. This is step 1 of the Graspful two-YAML workflow.
@@ -113,12 +129,12 @@ Run all 10 mechanical quality checks. Returns a score (e.g., "8/10") with detail
113
129
  2. Unique problem IDs
114
130
  3. Valid prerequisites (all refs point to real concepts)
115
131
  4. No DAG cycles
116
- 5. Minimum KPs per concept
117
- 6. Minimum problems per KP
118
- 7. Difficulty distribution (2+ levels per concept)
132
+ 5. Difficulty distribution (2+ levels per concept)
133
+ 6. Problems only assess material introduced in the lesson path
134
+ 7. Minimum problems per KP
119
135
  8. Explanation coverage (worked examples)
120
136
  9. Question deduplication (no near-duplicates at same difficulty)
121
- 10. Concept tag coverage
137
+ 10. Import dry run (graph remains valid for import)
122
138
 
123
139
  | Parameter | Type | Required | Description |
124
140
  |-----------|------|:---:|-------------|
@@ -126,6 +142,19 @@ Run all 10 mechanical quality checks. Returns a score (e.g., "8/10") with detail
126
142
 
127
143
  **Returns:** `{ passed, score, failures, warnings, stats }`
128
144
 
145
+ ### `graspful_import_academy`
146
+
147
+ Import academy manifest YAML plus the course YAMLs it references.
148
+
149
+ | Parameter | Type | Required | Description |
150
+ |-----------|------|:---:|-------------|
151
+ | `manifestYaml` | string | Yes | Full academy manifest YAML string |
152
+ | `courseYamls` | object | Yes | Map of manifest file paths to full course YAML strings |
153
+ | `org` | string | Yes | Organization slug |
154
+ | `publish` | boolean | No | Publish imported courses after academy import |
155
+ | `replace` | boolean | No | Replace existing content on re-import |
156
+ | `archiveMissing` | boolean | No | Archive removed content on re-import |
157
+
129
158
  ### `graspful_import_course`
130
159
 
131
160
  Import course YAML into a Graspful organization. Creates as draft by default. If `publish=true`, the server runs the review gate first.
@@ -167,6 +196,7 @@ Generate brand YAML scaffold for a white-label learning site. Niche presets set
167
196
  |-----------|------|:---:|-------------|
168
197
  | `niche` | string | Yes | `education`, `healthcare`, `finance`, `tech`, or `legal` |
169
198
  | `name` | string | No | Brand name |
199
+ | `topic` | string | No | Academy topic for more specific landing-page copy |
170
200
  | `domain` | string | No | Custom domain |
171
201
  | `orgSlug` | string | No | Organization slug |
172
202
 
@@ -192,24 +222,26 @@ List all courses in a Graspful organization.
192
222
  ## Typical Agent Workflow
193
223
 
194
224
  ```
195
- 1. Scaffold graspful_scaffold_course(topic: "Kubernetes Networking", estimatedHours: 8)
225
+ 1. Academy shell graspful_create_academy(topic: "Kubernetes Networking")
226
+ Define the academy boundary first, then author the courses inside it.
227
+
228
+ 2. Course graph graspful_scaffold_course(topic: "Kubernetes Networking Foundations", estimatedHours: 8)
196
229
  Edit the returned YAML -- add concepts, set prerequisites
197
230
 
198
- 2. Validate graspful_validate(yaml) -- catch schema errors early
231
+ 3. Validate graspful_validate(yaml) -- catch schema errors early
199
232
 
200
- 3. Fill graspful_fill_concept(yaml, conceptId: "k8s-services")
233
+ 4. Fill graspful_fill_concept(yaml, conceptId: "k8s-services")
201
234
  Repeat for each concept. Replace TODO placeholders with real content.
202
235
  Validate after each fill.
203
236
 
204
- 4. Review graspful_review_course(yaml) -- run quality gate
237
+ 5. Review graspful_review_course(yaml) -- run quality gate
205
238
  Fix failures, re-review until 10/10
206
239
 
207
- 5. Import graspful_import_course(yaml, org: "acme") -- creates draft
208
-
209
- 6. Brand graspful_create_brand(niche: "tech", name: "Acme Learn")
240
+ 6. Brand graspful_create_brand(niche: "tech", topic: "Kubernetes Networking", name: "Acme Learn")
241
+ Replace scaffold copy with learner-specific landing-page proof
210
242
  graspful_import_brand(yaml, orgSlug: "acme")
211
243
 
212
- 7. Publish graspful_publish_course(courseId: "...", org: "acme")
244
+ 7. Import graspful_import_academy(manifestYaml, courseYamls, org: "acme", publish: true)
213
245
  ```
214
246
 
215
247
  Offline tools (scaffold, fill, validate, review, describe, create_brand) need no API key. Only import, publish, import_brand, and list_courses require `GRASPFUL_API_KEY`.
@@ -262,6 +294,10 @@ Same pattern -- point `command` at `npx` and `args` at `@graspful/mcp`. The serv
262
294
  |----------|:---:|-------------|
263
295
  | `GRASPFUL_API_KEY` | For import/publish/list | API key for authenticated operations |
264
296
  | `GRASPFUL_API_URL` | No | API base URL (default: `https://api.graspful.ai`) |
297
+ | `GRASPFUL_USER_ID` | No | Graspful user ID for analytics identity continuity |
298
+ | `GRASPFUL_TELEMETRY_DISABLED` | No | Set to `1` to disable anonymous product analytics |
299
+
300
+ The MCP server sends tool usage and outcome metadata to help improve Graspful. It never sends API keys or YAML course bodies. Set `GRASPFUL_TELEMETRY_DISABLED=1` to disable this data collection.
265
301
 
266
302
  ## Links
267
303
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1,22 @@
1
1
  #!/usr/bin/env node
2
- export {};
2
+ export declare function mcpDistinctId(): string;
3
+ interface ToolDef {
4
+ name: string;
5
+ description: string;
6
+ inputSchema: {
7
+ type: 'object';
8
+ properties: Record<string, unknown>;
9
+ required?: string[];
10
+ };
11
+ }
12
+ declare const TOOLS: ToolDef[];
13
+ type ToolResult = {
14
+ content: Array<{
15
+ type: 'text';
16
+ text: string;
17
+ }>;
18
+ isError?: boolean;
19
+ };
20
+ declare function handleToolCall(name: string, args: Record<string, unknown>): Promise<ToolResult>;
21
+ export { TOOLS, handleToolCall };
3
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA0CA,wBAAgB,aAAa,IAAI,MAAM,CAatC;AAoED,UAAU,OAAO;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAED,QAAA,MAAM,KAAK,EAAE,OAAO,EAwPnB,CAAC;AAIF,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAUF,iBAAe,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CA8O9F;AAED,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC"}