@phenomenalorg/mcp 0.3.0 → 0.5.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 CHANGED
@@ -92,6 +92,18 @@ habits that go with them: call `list_my_orgs` before anything else, draft →
92
92
  preview → publish, never confirm a send on its own initiative, keep member
93
93
  details out of anything public.
94
94
 
95
+ For page authoring, read `phenomenal://instructions` and call
96
+ `get_page_authoring_state` first: canonical content and revisions define the
97
+ edit. Use `preview_page_changes` with `DRAFT`, then `save_page_changes` to save
98
+ content and its document Look together privately. Read the canonical state
99
+ back after saving. Page-wide CSS belongs to Looks; preserve enabled-language
100
+ HTML and unrelated blocks when changing appearance or making a targeted edit.
101
+
102
+ Publication is separate: review a fresh `PUBLISH` preview, then call
103
+ `publish_page` with its exact required review receipt only after explicit human
104
+ confirmation. Saving a draft does not publish it. The generated skill and tool
105
+ references describe the current inputs and review requirements.
106
+
95
107
  ```bash
96
108
  npx @phenomenalorg/mcp --skill .claude/skills # install it into a project
97
109
  npx @phenomenalorg/mcp --skill # install into ./.claude/skills if it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phenomenalorg/mcp",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "Phenomenal MCP bridge — connects a stdio-only MCP client to the Phenomenal MCP server over Streamable HTTP, with browser sign-in.",
6
6
  "license": "MIT",
@@ -44,6 +44,7 @@
44
44
  "open": "^11.0.0"
45
45
  },
46
46
  "devDependencies": {
47
+ "@ptopro/mcp-tools": "workspace:*",
47
48
  "@types/node": "^22.10.0",
48
49
  "typescript": "^5.6.0",
49
50
  "vitest": "^2.1.0"
package/skill/SKILL.md CHANGED
@@ -8,24 +8,26 @@ description: Use when the user wants to manage a PTO, school or club in Phenomen
8
8
  <!-- Generated from the Phenomenal tool registry. Do not edit by hand: a drift
9
9
  gate fails when these files are not what the registry currently says. -->
10
10
 
11
- _Tool surface: 39 tools · 163 actions · 5 prompts · fingerprint `5dc7363e`._
11
+ _Tool surface: 42 tools · 165 actions · 5 prompts · fingerprint `a8796891`._
12
12
 
13
13
  You are connected to Phenomenal, the platform for this PTO's site, members, events, tickets, email, forms, store and money.
14
14
 
15
15
  Start with list_my_orgs. Every organization id comes from it; never guess or invent one. Name the selected organization; ask if ambiguous.
16
16
 
17
- Say whether you are drafting, saving or publishing. draft_page saves nothing. draft_broadcast saves a draft and returns its id; it sends nothing. update_page_draft saves privately. publish_page publishes; send_broadcast sends to families.
17
+ Say when you are previewing, saving or publishing. Page Looks previews and Cancel write nothing; save_page_changes/update_page_draft stay private. draft_broadcast saves a draft but sends nothing. Only publish/send reaches an audience.
18
18
 
19
19
  For any tool with confirm, first call WITHOUT confirm. Present the returned action, target and effect to the user, then END THE TURN. Wait for a NEW explicit user message approving that exact preview; only then use confirm: true for the same action/target. The initial request and client/native tool-permission approval do not approve a later preview. Never self-confirm. “Nothing has happened yet” is a successful no-effect preview, not an error or retry signal.
20
20
 
21
21
  Mail and money are one-way. Slow down before sending, refunding or paying out.
22
22
 
23
- Keep member names, addresses and form answers in your answer to the officer; never copy them into public pages or broadcasts. Write US English, plainly and warmly, for parents on phones. On FORBIDDEN, explain the role limit and stop; never hunt for another route.
23
+ Keep member names, addresses and form answers in your answer to the officer, never on public pages or broadcasts. Write warm, plain US English for parents on phones. On FORBIDDEN, explain the role limit and stop.
24
24
 
25
- Publish a page: list_pagesget_page draft_page update_page_draft (saved privately) → preview publish_pageask → publish_page with confirm: true.
25
+ Looks are the default for new page-wide styling: get_page_authoring_stateDRAFT previewsave_page_changes (private) → get_page_authoring_state to read the canonical save PUBLISH preview → publish_page. Use complete content and exact revisions/digests; legacy tools remain compatible.
26
26
 
27
27
  For other work: list_mutations → describe_mutation → run_mutation. Read arguments; never guess. query_graphql is read-only.
28
28
 
29
+ Custom HTML supports scoped styles, gradients, animations and static email fallback. Before authoring CSS, read the complete grammar and working example in references/starting-doc.md or phenomenal://instructions. Save privately and inspect validated stored HTML.
30
+
29
31
  ## Worked sequences
30
32
 
31
33
  Draft the weekly newsletter for my organization (call list_my_orgs first): org_overview → list_events for the next three weeks → list_pages → draft_broadcast. Report the saved draft and audience; use US English for parents. If a test is requested: send_broadcast_test without confirm → present its action/target/effect → end the turn → wait for a NEW explicit user message approving that preview → confirm the same action/target. Repeat the entire sequence separately for send_broadcast; test approval never approves the full send.
@@ -3,7 +3,7 @@
3
3
  <!-- Generated from the Phenomenal tool registry. Do not edit by hand: a drift
4
4
  gate fails when these files are not what the registry currently says. -->
5
5
 
6
- _Tool surface: 39 tools · 163 actions · 5 prompts · fingerprint `5dc7363e`._
6
+ _Tool surface: 42 tools · 165 actions · 5 prompts · fingerprint `a8796891`._
7
7
 
8
8
  The curated tools in `references/tools.md` cover the work an officer does most days. Everything else Phenomenal can do is reachable by name:
9
9
 
@@ -213,9 +213,11 @@ Areas: account, brand, broadcasts, connections, domains, drive, email-preference
213
213
  - `generateBlockImage` — Generate an image for one content block from an instruction.
214
214
  - `generateSitePages` **(confirm)** — Generate and publish a set of starter pages for the site from a description.
215
215
  - `movePage` — Change a page's URL slug.
216
- - `publishPage` **(confirm)** — Prefer the `publish_page` tool. Publish a page draft to the live site.
216
+ - `previewDocumentLook` — Prefer `preview_page_changes`.
217
+ - `publishPage` **(confirm)** — Prefer the `publish_page` tool. Publish a page draft to its configured audience on the live site.
217
218
  - `renamePage` — Change a page's title, optionally for one language only.
218
219
  - `rewriteBlockText` — Rewrite one content block's text from a plain-language instruction.
220
+ - `saveDocumentWithLook` — Prefer `save_page_changes`.
219
221
  - `setPageEditPolicy` **(confirm)** — Set who may edit a page — organization admins, or a group's stewards too.
220
222
  - `setPageGroupSlug` — Change a page's path segment underneath its group.
221
223
  - `setPageMediaAudience` **(confirm)** — Change who can see the images on a page.
@@ -3,7 +3,7 @@
3
3
  <!-- Generated from the Phenomenal tool registry. Do not edit by hand: a drift
4
4
  gate fails when these files are not what the registry currently says. -->
5
5
 
6
- _Tool surface: 39 tools · 163 actions · 5 prompts · fingerprint `5dc7363e`._
6
+ _Tool surface: 42 tools · 165 actions · 5 prompts · fingerprint `a8796891`._
7
7
 
8
8
  Two tools answer questions no curated tool anticipated.
9
9
 
@@ -3,7 +3,7 @@
3
3
  <!-- Generated from the Phenomenal tool registry. Do not edit by hand: a drift
4
4
  gate fails when these files are not what the registry currently says. -->
5
5
 
6
- _Tool surface: 39 tools · 163 actions · 5 prompts · fingerprint `5dc7363e`._
6
+ _Tool surface: 42 tools · 165 actions · 5 prompts · fingerprint `a8796891`._
7
7
 
8
8
  Phenomenal runs a school's PTO: its public website, its member roster, its events and tickets, its email to families, its forms, its store and its money. It exposes all of that over the Model Context Protocol, so an assistant an officer already uses can do the work with them.
9
9
 
@@ -59,18 +59,20 @@ You are connected to Phenomenal, the platform for this PTO's site, members, even
59
59
 
60
60
  Start with list_my_orgs. Every organization id comes from it; never guess or invent one. Name the selected organization; ask if ambiguous.
61
61
 
62
- Say whether you are drafting, saving or publishing. draft_page saves nothing. draft_broadcast saves a draft and returns its id; it sends nothing. update_page_draft saves privately. publish_page publishes; send_broadcast sends to families.
62
+ Say when you are previewing, saving or publishing. Page Looks previews and Cancel write nothing; save_page_changes/update_page_draft stay private. draft_broadcast saves a draft but sends nothing. Only publish/send reaches an audience.
63
63
 
64
64
  For any tool with confirm, first call WITHOUT confirm. Present the returned action, target and effect to the user, then END THE TURN. Wait for a NEW explicit user message approving that exact preview; only then use confirm: true for the same action/target. The initial request and client/native tool-permission approval do not approve a later preview. Never self-confirm. “Nothing has happened yet” is a successful no-effect preview, not an error or retry signal.
65
65
 
66
66
  Mail and money are one-way. Slow down before sending, refunding or paying out.
67
67
 
68
- Keep member names, addresses and form answers in your answer to the officer; never copy them into public pages or broadcasts. Write US English, plainly and warmly, for parents on phones. On FORBIDDEN, explain the role limit and stop; never hunt for another route.
68
+ Keep member names, addresses and form answers in your answer to the officer, never on public pages or broadcasts. Write warm, plain US English for parents on phones. On FORBIDDEN, explain the role limit and stop.
69
69
 
70
- Publish a page: list_pagesget_page draft_page update_page_draft (saved privately) → preview publish_pageask → publish_page with confirm: true.
70
+ Looks are the default for new page-wide styling: get_page_authoring_stateDRAFT previewsave_page_changes (private) → get_page_authoring_state to read the canonical save PUBLISH preview → publish_page. Use complete content and exact revisions/digests; legacy tools remain compatible.
71
71
 
72
72
  For other work: list_mutations → describe_mutation → run_mutation. Read arguments; never guess. query_graphql is read-only.
73
73
 
74
+ Custom HTML supports scoped styles, gradients, animations and static email fallback. Before authoring CSS, read the complete grammar and working example in references/starting-doc.md or phenomenal://instructions. Save privately and inspect validated stored HTML.
75
+
74
76
  ## Worked sequences
75
77
 
76
78
  Draft the weekly newsletter for my organization (call list_my_orgs first): org_overview → list_events for the next three weeks → list_pages → draft_broadcast. Report the saved draft and audience; use US English for parents. If a test is requested: send_broadcast_test without confirm → present its action/target/effect → end the turn → wait for a NEW explicit user message approving that preview → confirm the same action/target. Repeat the entire sequence separately for send_broadcast; test approval never approves the full send.
@@ -83,6 +85,37 @@ Month-end money for my organization (call list_my_orgs first): payout_status →
83
85
 
84
86
  ## Reference
85
87
 
88
+ ### Custom HTML styles
89
+
90
+ Use a Look by default for new page-wide styling. A Look supplies sparse design-token overrides and optional bounded CSS; omitted tokens inherit the organization base. Existing block-local HTML <style> islands remain supported, stay with their blocks and are scoped independently. Do not automatically relocate either stylesheet into the other layer or use the legacy island editor as the default way to author a page Look.
91
+
92
+ Keep each HTML locale as a complete localized value such as props.html.en and props.html.es. Preserve element structure, links, media provenance, class names, ids and keyframe names while translating visible copy. Author ordinary local class/id/keyframe names only: Phenomenal applies its own instance scopes. Look CSS and HTML CSS share the supported selector, motion, URL and composition safety limits described below, including the 16,384-byte Look CSS ceiling.
93
+
94
+ Choosing a shared Look uses its key; an owned Look carries its complete value and optional copiedFrom provenance; base removes the page override. Use picker values only for presentation. Revisions and the effect-bound previewDigest bind the exact reviewed input; actual server permissions remain the authority and are rechecked by every resolver. Preview and Cancel are zero-write, save_page_changes remains a private draft, and only a separately reviewed and confirmed publish_page changes the public site.
95
+
96
+ Custom HTML supports local <style> blocks in a leaf {id,type:"html",props:{html:{en:"…"}}} or a section with props.kind:"html". Prefer the same get_page_authoring_state → DRAFT preview → save_page_changes → canonical get_page_authoring_state read-back path for combined HTML-and-Look edits. Legacy update_page_draft and get_page remain compatible for existing island-only work. The server encodes local classes/IDs and binds CSS separately for each rendered instance. Never write runtime scope/keyframe IDs into stored content.
97
+
98
+ CSS v1: element/class/ID compounds and comma lists; descendant and child (>) combinators; :hover, :focus, :focus-visible. No global/universal/attribute/sibling selectors, functional pseudos or pseudo-elements. Media queries are a single (min-width:Npx)/(max-width:Npx), N=240–2560, or (prefers-reduced-motion:reduce/no-preference). Existing approved inline typography, spacing, color, borders, table and flex/grid display rules also work in sheets. Linear gradients accept an optional -360–360deg angle; radial gradients an optional circle/ellipse. Both need 2–8 approved opaque named or 3/6-digit hex colors with optional ordered 0–100% stops. Background-position uses two 0–100% values; background-size uses two 100–400% values.
99
+
100
+ Named local @keyframes animate transform/background-position only. Transform supports up to three distinct single-argument functions: translateX/Y ±16px, rotate ±5deg, scale 0.95–1.05. One animation per rule: shorthand or name/duration/delay/timing-function/iteration-count/direction/fill-mode longhands. Duration 0.2–30s, delay 0–5s, iterations 1–10 or infinite (at least 2s per cycle), linear/ease/ease-in/ease-out/ease-in-out, normal/reverse/alternate/alternate-reverse, none/forwards/backwards/both. Animation names are case-sensitive and must be defined in the same sheet. Transition shorthand supports transform or background-position, 0.1–2s and one of those easings. The site provides Pause/Resume and enforces reduced motion automatically; content stays readable.
101
+
102
+ Block-local canonical stylesheet limits: 16,384 characters, 2,048 AST nodes, 64 ordinary rules, 32 declarations per rule, 8 selector arms and 8 compounds per arm, 8 keyframes with 2–16 stops and at most 4 motion declarations per stop. A Look's separate ceiling is 16,384 UTF-8 bytes. One media nesting layer. An unsupported or malformed HTML-island sheet is omitted as a whole while readable HTML remains; invalid Look CSS instead refuses preview/save and is never silently discarded as a valid Look save. No URLs/imports/font loading, custom properties, positioning, opacity, hiding, flashing, resource fetches or !important. Existing HTML/media URL and proposal provenance policies still apply. Web rendering retains scoped interactive/motion behavior. Email resolves static selector specificity, order, inline precedence and inheritance, then emits safe inline styles with solid gradient fallback; hover/media/motion effects are omitted. Email preview uses the actual email producer.
103
+
104
+ Background-position keyframes use exactly two endpoints, from/0% and to/100%, over at least 2s; transform-only entrances may be shorter. The 16,384-character cap applies to canonical serialized CSS. Input/runtime transport allows 2MiB for encoded scope expansion; rescoping restores the same canonical budget. Email matching is capped at 200,000 memoized states per fragment; exhaustion preserves readable content and original inline styles without a partial cascade.
105
+
106
+ CSS policy revision: html-scoped-css-v1.1.
107
+
108
+ Font-family accepts an ordered comma list of at most 8 entries from serif, sans-serif, monospace, system-ui, arial, georgia, verdana only; no quoted/unknown fonts or font loading. Solid background accepts approved opaque named or 3/6-digit hex colors and canonicalizes to background-color, with last-declaration source order; it is a color alias, not general background layer/reset syntax. Example declarations: font-family:Georgia,serif;background:#ffffff;font-size:1rem. Font-size must be at least 12px, 1em/1rem or 100%; 0.95rem is rejected. Unsupported declarations reject the entire stylesheet, so inspect saved HTML rather than assuming generic validation means every style survived.
109
+
110
+ Working localized HTML value (use its string as props.html.en; the volunteer link must match a real page in the target site):
111
+ <style>
112
+ .welcome{background:linear-gradient(90deg,#123456 0%,#345678 100%);background-size:200% 200%;background-position:0% 50%;color:white;padding:24px;border-radius:16px;animation:Welcome 6s linear infinite alternate}
113
+ .welcome a{color:white;display:inline-block;padding:12px;border:1px solid white;border-radius:8px;transition:transform 0.2s ease}
114
+ .welcome a:hover,.welcome a:focus-visible{transform:translateY(-4px)}
115
+ @media (max-width:600px){.welcome{padding:16px}}
116
+ @keyframes Welcome{from{background-position:0% 50%}to{background-position:100% 50%}}
117
+ </style><section class="welcome"><h2>Welcome, families</h2><p>Make our school a wonderful place to grow.</p><a href="/volunteer">Find your volunteer moment</a></section>
118
+
86
119
  - https://phenomenal.org/agents/tools — every tool, its arguments, and whether it needs `confirm`.
87
120
  - https://phenomenal.org/agents/mutations — the `run_mutation` long tail, by area.
88
121
  - https://phenomenal.org/agents/schema — `query_graphql` and `get_schema`, and the limits they enforce.
@@ -3,7 +3,7 @@
3
3
  <!-- Generated from the Phenomenal tool registry. Do not edit by hand: a drift
4
4
  gate fails when these files are not what the registry currently says. -->
5
5
 
6
- _Tool surface: 39 tools · 163 actions · 5 prompts · fingerprint `5dc7363e`._
6
+ _Tool surface: 42 tools · 165 actions · 5 prompts · fingerprint `a8796891`._
7
7
 
8
8
  Every tool the Phenomenal MCP server offers, in the order a client lists them. `list_my_orgs` is first because every other tool needs an organization id from it.
9
9
 
@@ -103,6 +103,49 @@ One page from Phenomenal with its current draft content, as the array of blocks
103
103
 
104
104
  - `pageId` (string, required) — From list_pages.
105
105
 
106
+ ### `get_page_authoring_state`
107
+
108
+ Read the complete authorized page content, Looks appearance, revisions, actions and safe same-organization picker context before editing.
109
+
110
+ **Hints:** read-only, idempotent. **Confirm:** not required.
111
+
112
+ **Arguments**
113
+
114
+ - `orgId` (string) — The organization to act for — an id from list_my_orgs. Never invent one; if you are unsure which, ask the person.
115
+ - `pageId` (string, required) — The exact page id from get_page_authoring_state.
116
+
117
+ ### `preview_page_changes`
118
+
119
+ Validate complete page content and a Look together without writing. DRAFT previews edits; PUBLISH previews the exact stored draft.
120
+
121
+ **Hints:** read-only, idempotent. **Confirm:** not required.
122
+
123
+ **Arguments**
124
+
125
+ - `orgId` (string) — The organization to act for — an id from list_my_orgs. Never invent one; if you are unsure which, ask the person.
126
+ - `pageId` (string, required) — The exact page id from get_page_authoring_state.
127
+ - `expectedDocumentRevision` (string, required) — Copy exactly from get_page_authoring_state; never infer or synthesize it.
128
+ - `expectedThemeRevision` (string, required) — Copy exactly from get_page_authoring_state; never infer or synthesize it.
129
+ - `content` (object)
130
+ - `lookChange` (any)
131
+ - `effect` (string (DRAFT | PUBLISH)) — DRAFT by default. PUBLISH accepts no edits and previews stored state.
132
+
133
+ ### `save_page_changes`
134
+
135
+ Save one previously previewed complete page-and-Look DRAFT atomically. It remains private and never publishes or retries.
136
+
137
+ **Hints:** writes. **Confirm:** not required.
138
+
139
+ **Arguments**
140
+
141
+ - `orgId` (string) — The organization to act for — an id from list_my_orgs. Never invent one; if you are unsure which, ask the person.
142
+ - `pageId` (string, required) — The exact page id from get_page_authoring_state.
143
+ - `expectedDocumentRevision` (string, required) — Copy exactly from get_page_authoring_state; never infer or synthesize it.
144
+ - `expectedThemeRevision` (string, required) — Copy exactly from get_page_authoring_state; never infer or synthesize it.
145
+ - `content` (object)
146
+ - `lookChange` (any)
147
+ - `previewDigest` (string, required) — Copy exactly from the matching VALID DRAFT preview.
148
+
106
149
  ### `draft_page`
107
150
 
108
151
  Draft content for a Phenomenal page from a plain-language instruction and return the blocks. It SAVES NOTHING — show the result to the person, then save it with update_page_draft. This counts against the organization's AI budget, exactly as drafting from the admin app does.
@@ -124,11 +167,11 @@ Save a page's draft in Phenomenal. Replaces the WHOLE draft, so send the full bl
124
167
  **Arguments**
125
168
 
126
169
  - `pageId` (string, required) — From list_pages.
127
- - `blocks` (array, required) — The page draft as an array of Phenomenal content blocks — objects with "id", "type" and "props". Replaces the whole draft, so read the current one with get_page and send it back changed. Plain text you send in a translatable prop comes back as {"en":"…"}; that is the site storing it per language, not your save failing.
170
+ - `blocks` (array, required) — The page draft as an array of Phenomenal content blocks — objects with "id", "type" and "props". Replaces the whole draft, so read the current one with get_page and send it back changed. Plain text you send in a translatable prop comes back as {"en":"…"}; that is the site storing it per language, not your save failing. Read phenomenal://block-vocabulary for the generated property names of every leaf block and section kind.
128
171
 
129
172
  ### `publish_page`
130
173
 
131
- Publish a page's draft to the live Phenomenal site. Everyone can see it immediately, so this needs confirm: true.
174
+ Publish a page's draft to its configured audience on the live Phenomenal site. This needs confirm: true.
132
175
 
133
176
  **Hints:** writes. **Confirm:** required — without it you get a preview and nothing changes.
134
177
 
@@ -136,6 +179,7 @@ Publish a page's draft to the live Phenomenal site. Everyone can see it immediat
136
179
 
137
180
  - `pageId` (string, required) — From list_pages.
138
181
  - `confirm` (boolean) — First call without confirm. Present the returned action, target and effect, END THE TURN, and wait for a NEW explicit user message approving that exact preview. Only then set true for the same action/target. Initial requests and client/native tool-permission approvals do not count.
182
+ - `lookReview` (object)
139
183
 
140
184
  ### `unpublish_page`
141
185