@typeroll/mcp-server 0.7.5 → 0.7.7

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.
@@ -0,0 +1,179 @@
1
+ ---
2
+ name: tr-seo
3
+ description: Use when the user asks to improve SEO, fix meta tags, add structured data, check page titles, or audit the site's search visibility. Triggers on "SEO", "meta descriptions", "Google ranking", "structured data", "JSON-LD", "sitemap", "sökoptimering", or "hjälp mig synas på Google".
4
+ ---
5
+
6
+ # SEO audit and improvements for a Typeroll site
7
+
8
+ ## What Typeroll handles automatically
9
+
10
+ - `<html lang>` from site `language` setting (per-page override via `language` field)
11
+ - `<title>` = `page.seo_title || page.title + settings.default_seo_suffix`
12
+ - `<meta name="description">` from `page.seo_description`
13
+ - `<meta name="robots">` from `page.noindex`
14
+ - `<meta property="og:*">` Open Graph tags from seo_title, seo_description, og_image
15
+ - `<link rel="canonical">` from `page.canonical_url` (falls back to the page's own URL)
16
+ - Article schema from `kind: "article"` + `author` + `date_published`
17
+ - Page schema from `kind: "page"` (default)
18
+ - `robots.txt` from `settings.robots_txt`
19
+ - Sanitized HTML that preserves semantic structure
20
+
21
+ ## Recipe
22
+
23
+ ### 1. Audit current state
24
+
25
+ ```
26
+ list_pages status="all"
27
+ read_site_settings
28
+ ```
29
+
30
+ For each page, check:
31
+ - Is `seo_title` set? (if not, Google uses `title` + suffix — often fine)
32
+ - Is `seo_description` set? (150–160 chars, unique per page, includes keywords)
33
+ - Is `og_image` set for the homepage and key landing pages?
34
+ - Does the page have exactly one `<h1>`?
35
+
36
+ ### 2. Fix missing meta descriptions
37
+
38
+ ```
39
+ batch_update_pages updates=[
40
+ {page_id: "home", patch: {seo_description: "Acme designar rum..."}},
41
+ {page_id: "om-oss", patch: {seo_description: "Vi är ett..."}},
42
+ {page_id: "tjanster", patch: {seo_description: "Våra tjänster..."}}
43
+ ]
44
+ ```
45
+
46
+ Guidelines:
47
+ - 150–160 characters
48
+ - Include the most important keyword naturally
49
+ - Make it a compelling reason to click, not a summary of the page's nav
50
+
51
+ ### 3. Fix page titles
52
+
53
+ SEO title = what Google shows in search results.
54
+
55
+ If `settings.default_seo_suffix` is set (e.g. " — Acme Studio"), every
56
+ page whose `seo_title` is empty will show `title + suffix`. That's usually
57
+ fine for inner pages; set an explicit `seo_title` only when you want
58
+ something different.
59
+
60
+ ```
61
+ update_site_settings {"default_seo_suffix": " — Acme Studio"}
62
+
63
+ update_page page_id="home" patch={
64
+ "seo_title": "Acme Studio — Inredningsdesign i Stockholm"
65
+ }
66
+ ```
67
+
68
+ ### 4. Add Open Graph images
69
+
70
+ Set `og_image` on pages that get shared on social media. If the site has
71
+ a branded hero image, upload it:
72
+
73
+ ```
74
+ upload_media_from_url url="https://..." alt="Acme Studio — Inredningsdesign"
75
+ # → returns cdn_url
76
+
77
+ batch_update_pages updates=[
78
+ {page_id: "home", patch: {og_image: "<cdn_url>"}},
79
+ {page_id: "om-oss", patch: {og_image: "<cdn_url>"}}
80
+ ]
81
+ ```
82
+
83
+ OG image dimensions: 1200×630px ideal. The platform doesn't resize —
84
+ use a correctly-sized source image.
85
+
86
+ ### 5. Add structured data (JSON-LD)
87
+
88
+ Typeroll auto-generates Article and Page schema, but you can override or
89
+ extend with custom JSON-LD per page. Example: LocalBusiness on the homepage.
90
+
91
+ ```
92
+ update_page page_id="home" patch={
93
+ "json_ld": "{\"@context\":\"https://schema.org\",\"@type\":\"LocalBusiness\",\"name\":\"Acme Studio\",\"url\":\"https://acme.se\",\"telephone\":\"+46812345\",\"address\":{\"@type\":\"PostalAddress\",\"streetAddress\":\"Drottninggatan 1\",\"addressLocality\":\"Stockholm\",\"postalCode\":\"111 51\",\"addressCountry\":\"SE\"}}"
94
+ }
95
+ ```
96
+
97
+ **Important:** JSON-LD goes in the `json_ld` field as a JSON *string*
98
+ (not a nested object). The renderer injects it inside
99
+ `<script type="application/ld+json">`.
100
+
101
+ Common schemas worth adding:
102
+ - Homepage: `LocalBusiness` or `Organization`
103
+ - About: `AboutPage`
104
+ - Contact: `ContactPage`
105
+ - Blog articles: auto-generated from `kind:"article"` + `author`
106
+ - Events: `Event` with `startDate`, `location`
107
+ - Products: `Product` with `offers`
108
+
109
+ ### 6. robots.txt
110
+
111
+ The default robots.txt allows all crawlers. Update if needed:
112
+
113
+ ```
114
+ update_site_settings {
115
+ "robots_txt": "User-agent: *\nAllow: /\nSitemap: https://acme.se/sitemap.xml"
116
+ }
117
+ ```
118
+
119
+ Typeroll doesn't generate a sitemap automatically in phase 1. If the
120
+ customer needs one, create a `/sitemap` page with HTML that lists all
121
+ published pages, or write a static `sitemap.xml` as a page with
122
+ `slug: "sitemap.xml"` and HTML-encoded XML (not recommended for large sites).
123
+
124
+ ### 7. Canonical URLs
125
+
126
+ Set `canonical_url` when a page has a duplicate (e.g. the same content
127
+ accessible via two slugs after a migration):
128
+
129
+ ```
130
+ update_page page_id="tjansterna" patch={
131
+ "canonical_url": "https://acme.se/tjanster",
132
+ "noindex": true
133
+ }
134
+ ```
135
+
136
+ ### 8. Language settings
137
+
138
+ ```
139
+ update_site_settings {"language": "sv"}
140
+ ```
141
+
142
+ Per-page override for multilingual content:
143
+ ```
144
+ update_page page_id="about-en" patch={"language": "en"}
145
+ ```
146
+
147
+ ### 9. Heading audit
148
+
149
+ Use `search_pages` to find structural problems:
150
+
151
+ ```
152
+ search_pages contains="<h1" # pages that have at least one H1
153
+ ```
154
+
155
+ Then `read_page` on pages that seem to have none or multiple. Fix via
156
+ `update_page patch={html_content: "<corrected HTML>"}`.
157
+
158
+ ### 10. Deploy
159
+
160
+ ```
161
+ trigger_deploy
162
+ get_deploy_status job_id=<id>
163
+ ```
164
+
165
+ ## Pitfalls
166
+
167
+ - **Don't stuff keywords.** Write descriptions for humans. Google ignores
168
+ `<meta name="keywords">` (not a field in Typeroll anyway).
169
+ - **JSON-LD is a string, not a nested field.** Pass the entire schema as
170
+ a JSON-encoded string in `json_ld`. The server escapes `</script` before
171
+ injection.
172
+ - **OG images need absolute URLs.** The `cdn.typeroll.com` URLs are always
173
+ absolute — use those.
174
+ - **`canonical_url` + `noindex` together.** If you noindex a page AND set
175
+ canonical, the canonical is redundant (noindexed pages don't pass equity).
176
+ Use one or the other.
177
+ - **Default suffix on homepage looks odd.** "Acme Studio — Acme Studio"
178
+ happens when title="Acme Studio" and suffix=" — Acme Studio". Set an
179
+ explicit `seo_title` for the homepage.