@typeroll/mcp-server 0.7.8 → 0.7.9
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/AGENTS.md +7 -3
- package/dist/index.js +1 -1
- package/dist/server.js +1 -1
- package/dist/tools/pages.js +4 -2
- package/package.json +1 -1
- package/skills/tr-blog.md +1 -1
package/AGENTS.md
CHANGED
|
@@ -33,9 +33,13 @@ maps to one HTTP endpoint; the actual logic runs in the customer's portal
|
|
|
33
33
|
- `html` — body lives in `html_content` as a single HTML string.
|
|
34
34
|
Useful when you have hand-written markup to drop in directly.
|
|
35
35
|
|
|
36
|
-
Slug
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
Slug is a single path segment — no slashes. `about` → `/about`,
|
|
37
|
+
`kontakt` → `/kontakt`, empty string `""` → homepage. The v1 API
|
|
38
|
+
rejects `services/design` and other slash-containing slugs with
|
|
39
|
+
"Invalid slug … slugs must not contain slashes." For nested URLs
|
|
40
|
+
like `/blog/{slug}` or `/services/{slug}`, the right primitive is a
|
|
41
|
+
**collection with `route_template`** (see the `tr-blog` and
|
|
42
|
+
`tr-directory` skills) — not a flat page with a slashed slug.
|
|
39
43
|
|
|
40
44
|
- **Partials = global blocks.** Three kinds:
|
|
41
45
|
- `header` — auto-injected at the top of every page.
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
16
16
|
import { TyperollClient } from './client.js';
|
|
17
17
|
import { runInstallSkillsCli } from './install-skills.js';
|
|
18
18
|
import { buildServer } from './server.js';
|
|
19
|
-
const VERSION = '0.7.
|
|
19
|
+
const VERSION = '0.7.9';
|
|
20
20
|
async function resolveSiteId(client) {
|
|
21
21
|
const fromEnv = process.env.TYPEROLL_SITE_ID?.trim();
|
|
22
22
|
if (fromEnv)
|
package/dist/server.js
CHANGED
|
@@ -46,7 +46,7 @@ function effectFor(name) {
|
|
|
46
46
|
}
|
|
47
47
|
return 'write';
|
|
48
48
|
}
|
|
49
|
-
const DEFAULT_INFO = { name: 'typeroll', version: '0.7.
|
|
49
|
+
const DEFAULT_INFO = { name: 'typeroll', version: '0.7.9' };
|
|
50
50
|
export function buildServer(options) {
|
|
51
51
|
if (!options.fixedSiteId && !options.allowedSites) {
|
|
52
52
|
throw new Error('buildServer: either fixedSiteId or allowedSites must be provided');
|
package/dist/tools/pages.js
CHANGED
|
@@ -65,11 +65,13 @@ export const pageTools = [
|
|
|
65
65
|
'Slug is derived from the title when omitted. Default status is "draft". ' +
|
|
66
66
|
'Homepage convention: pass slug="" (empty string) or omit slug and set title to "Home"; ' +
|
|
67
67
|
'the server stores it under id "home" with slug "". ' +
|
|
68
|
-
'
|
|
68
|
+
'Slug must be a single path segment — no leading/trailing slashes, no internal slashes. ' +
|
|
69
|
+
'For nested URLs like /blog/{slug} or /services/{slug}, use a collection with a ' +
|
|
70
|
+
'route_template (see the tr-blog and tr-directory skills) — NOT a page slug with a slash. ' +
|
|
69
71
|
'Returns the created page including html_content.',
|
|
70
72
|
inputSchema: {
|
|
71
73
|
title: z.string().min(1),
|
|
72
|
-
slug: z.string().optional().describe('URL slug
|
|
74
|
+
slug: z.string().optional().describe('URL slug — single path segment, no slashes (e.g. "about", "kontakt"). Empty string "" = homepage. For nested URLs use a collection with route_template, not a slug like "services/design" — the API rejects internal slashes.'),
|
|
73
75
|
content_mode: z.enum(['blocks', 'html']).optional().describe('Default "html". "html" stores body in html_content; "blocks" stores a Block[] tree (note: blocks mode pages render as empty until the block editor ships — use html mode for all real content).'),
|
|
74
76
|
html_content: z.string().optional().describe('Body HTML — only used when content_mode="html".'),
|
|
75
77
|
blocks: z.array(z.any()).optional().describe('Block tree — only used when content_mode="blocks". Omit to get the default heading+prose seed.'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typeroll/mcp-server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.9",
|
|
4
4
|
"description": "Model Context Protocol server for the Typeroll public API. Use with Claude Code or any MCP-compatible client to manage a Typeroll site.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
package/skills/tr-blog.md
CHANGED
|
@@ -154,7 +154,7 @@ Three calls. No per-article `create_page`. No HTML diffing by hand.
|
|
|
154
154
|
|
|
155
155
|
## Pitfalls
|
|
156
156
|
|
|
157
|
-
- **Don't fall back to "one page per article".** That was the pre-`item_template_html` pattern. It
|
|
157
|
+
- **Don't fall back to "one page per article".** That was the pre-`item_template_html` pattern. It's strictly worse now: design changes mean editing N pages, you lose `{{url}}` resolution in listings, sitemap doesn't include items, previews can't surface a per-item URL — and the API will reject your attempt anyway. `create_page` rejects slugs containing slashes ("Invalid slug … slugs must not contain slashes"), so `slug: "blog/foo"` doesn't even get through. The collection's `route_template` is the only path to nested URLs.
|
|
158
158
|
- **Slugs must be unique within the collection.** `regenerate_collection_listing` will silently drop items where `slug` is missing; the listing count will be lower than the item count.
|
|
159
159
|
- **Don't use non-ASCII field names.** `datum` not `Datum`; `forfattare` not `författare` in the `name`. The `label` is free-form.
|
|
160
160
|
- **Listing goes stale if you forget step 4.** Every item change needs `regenerate_collection_listing`. Add it to your mental checklist after every `create/update_collection_item`.
|