Hubs
Space MCP tools in the Hubs scope (hubs). Reach these with a wks_live_ key over space-mcp or space-api.
Tools in the hubs scope, callable over space-mcp (tools/call) or space-api (REST) with a wks_live_* key that grants hubs.
add_hub_discussion_reply
Scope: hubs:write
Post a reply on a discussion thread (blocked if the thread is locked).
| Parameter | Type | Required | Description |
|---|---|---|---|
discussion_id | string | yes | |
content | string | yes |
add_hub_moderator
Scope: hubs:write
Promote a user to hub moderator. user_id is the auth user id (from a member row's user_id). permissions optionally sets approve_members/approve_products/edit_hub.
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | |
permissions | object |
add_hub_tab
Scope: hubs:write
Add a content tab to the hub. module is a tab-module slug from list_hub_catalog (about, members, products, feed, events, discussions, resources, rooms, custom_page). config holds module-specific settings, e.g. custom_page → { paper_id }, products → { source_role_slug, require_approval }. Appended to the end unless sort_order is given.
| Parameter | Type | Required | Description |
|---|---|---|---|
module | string | yes | Tab-module slug (see list_hub_catalog). |
name | string | Tab label (defaults to the module's name). | |
icon | string | ||
config | object | Module-specific config. | |
sort_order | number | ||
is_visible | boolean | Show the tab (default true). |
approve_hub_member
Scope: hubs:write
Approve a pending hub member application. member_id is the hub member row id from list_hub_members.
| Parameter | Type | Required | Description |
|---|---|---|---|
member_id | string | yes |
create_hub_course
Scope: hubs:write
Create a classroom course (auto-creates a Classroom tab if missing). Add lessons with create_hub_lesson.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | |
description | string | ||
cover_url | string | ||
sort_order | number |
create_hub_discussion
Scope: hubs:write
Start a discussion thread (auto-creates a Discussions tab if missing). Optionally pin/lock it or file it under a category_id.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | |
body | string | ||
category_id | string | ||
is_pinned | boolean | ||
is_locked | boolean |
create_hub_discussion_category
Scope: hubs:write
Create a discussion category (auto-creates a Discussions tab if missing).
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
description | string | ||
sort_order | number |
create_hub_event
Scope: hubs:write
Schedule an event on the hub calendar (auto-creates an Events tab if missing). starts_at is an ISO timestamp. location_type online|in_person.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | |
description | string | ||
location_type | online | in_person | ||
location | string | ||
starts_at | string | yes | ISO timestamp, e.g. 2026-08-01T18:00:00Z |
ends_at | string | ||
cover_url | string |
create_hub_lesson
Scope: hubs:write
Add a lesson to a classroom course. content is rich text; video_url optional; attachments is an array of {url, name, type}.
| Parameter | Type | Required | Description |
|---|---|---|---|
course_id | string | yes | |
title | string | yes | |
content | string | ||
video_url | string | ||
attachments | object[] | ||
sort_order | number |
create_hub_resource
Scope: hubs:write
Add a resource to the hub library (auto-creates a Resources tab if missing). Provide a url OR a file_url. Optional category groups items.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | |
category | string | ||
description | string | ||
url | string | ||
file_url | string | ||
file_name | string | ||
icon | string | Optional icon: a Lucide icon name (e.g. 'BookOpen') or an image URL. |
create_hub_role
Scope: hubs:write
Create a membership role for the hub (e.g. Member, Seller, VIP). auto_approve grants it without owner review; is_public shows it on the hub's join page. Attach abilities with set_hub_role_permissions and join gating with set_hub_role_requirements.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
description | string | ||
icon | string | ||
color | string | ||
auto_approve | boolean | ||
is_public | boolean | ||
sort_order | number |
create_hub_room
Scope: hubs:write
Create a hub video/voice room. mode audio|video. schedule.mode: 'always' (persistent), 'once' (one-time — set scheduled_start/end), or 'daily'/'weekly'/'monthly' (recurring open hours). Access control: allowed_roles (hub_role_ids; empty = all members) and allowed_members (user_ids); require_approval enables a waiting room.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | |
description | string | ||
mode | audio | video | ||
schedule | object | { mode: always|once|daily|weekly|monthly, timezone, openTime, closeTime, weekdays[]… } | |
scheduled_start | string | ISO timestamp (schedule.mode='once'). | |
scheduled_end | string | ||
require_approval | boolean | ||
track_attendance | boolean | ||
record_sessions | boolean | ||
allowed_roles | string[] | ||
allowed_members | string[] |
delete_hub_course
Scope: hubs:write
Delete a classroom course and all its lessons. course_id from list_hub_courses.
| Parameter | Type | Required | Description |
|---|---|---|---|
course_id | string | yes |
delete_hub_discussion
Scope: hubs:write
Delete a discussion thread and its replies. discussion_id from list_hub_discussions.
| Parameter | Type | Required | Description |
|---|---|---|---|
discussion_id | string | yes |
delete_hub_discussion_category
Scope: hubs:write
Delete a discussion category (threads in it are kept, uncategorized). category_id from list_hub_discussion_categories.
| Parameter | Type | Required | Description |
|---|---|---|---|
category_id | string | yes |
delete_hub_discussion_reply
Scope: hubs:write
Delete a reply from a discussion thread (moderation). reply_id from list_hub_discussion_replies.
| Parameter | Type | Required | Description |
|---|---|---|---|
reply_id | string | yes |
delete_hub_event
Scope: hubs:write
Delete a hub event.
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id | string | yes |
delete_hub_lesson
Scope: hubs:write
Delete a classroom lesson. lesson_id from list_hub_lessons.
| Parameter | Type | Required | Description |
|---|---|---|---|
lesson_id | string | yes |
delete_hub_resource
Scope: hubs:write
Remove a resource from the hub library.
| Parameter | Type | Required | Description |
|---|---|---|---|
resource_id | string | yes |
delete_hub_role
Scope: hubs:write
Delete a hub role. Fails if members still hold it — reassign them first with set_hub_member_role.
| Parameter | Type | Required | Description |
|---|---|---|---|
role_id | string | yes |
delete_hub_room
Scope: hubs:write
Delete a hub video/voice room. room_id from list_hub_rooms.
| Parameter | Type | Required | Description |
|---|---|---|---|
room_id | string | yes |
get_hub
Scope: hubs:read
Get the hub connected to this space: profile, status, member counts (approved/pending/suspended), moderator count, public URL. Errors if no hub is linked.
get_hub_attendance
Scope: hubs:read
Room attendance overview for the connected hub (mirrors the owner Attendance dashboard): totals, per-member and per-room minutes/sessions. Only tracked rooms count.
get_hub_classroom_progress
Scope: hubs:read
Classroom completion stats: per-course lesson_count, learners, completed, in_progress. Optional course_id narrows to one course.
| Parameter | Type | Required | Description |
|---|---|---|---|
course_id | string |
get_hub_membership_plan
Scope: hubs:read
Get the connected hub's active paid membership plan, or free:true when the hub is free to join.
get_hub_role
Scope: hubs:read
Get one hub role in full: its fields, assigned permission tags, and join requirements. role_id from list_hub_roles.
| Parameter | Type | Required | Description |
|---|---|---|---|
role_id | string | yes |
get_hub_stats
Scope: hubs:read
One-call overview of the connected hub: member counts (approved/pending/suspended), moderators, tabs, roles, and content counts (discussions, events, resources, classroom courses/lessons, rooms) plus paid-membership snapshot.
list_hub_catalog
Scope: hubs:read
Discover the building blocks for hub structure: tab_modules (about, members, products, feed, events, discussions, resources, rooms, custom_page…), permission_tags (for role permissions), and role_requirement_types (join rules). Call this first so add_hub_tab / set_hub_role_permissions / set_hub_role_requirements use valid slugs.
list_hub_courses
Scope: hubs:read
List the connected hub's classroom courses with lesson_count each.
list_hub_discussion_categories
Scope: hubs:read
List the connected hub's discussion categories (optional groupings for threads).
list_hub_discussion_replies
Scope: hubs:read
List replies on a discussion thread (oldest first). discussion_id from list_hub_discussions.
| Parameter | Type | Required | Description |
|---|---|---|---|
discussion_id | string | yes | |
limit | number |
list_hub_discussions
Scope: hubs:read
List the connected hub's discussion threads (pinned first). Optionally filter by category_id.
| Parameter | Type | Required | Description |
|---|---|---|---|
category_id | string | ||
limit | number |
list_hub_event_rsvps
Scope: hubs:read
List RSVPs for a hub event (going/maybe/not_going) plus its going_count. event_id from list_hub_events.
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id | string | yes | |
status | going | maybe | not_going | ||
limit | number |
list_hub_events
Scope: hubs:read
List the connected hub's events. upcoming:true returns only future events.
| Parameter | Type | Required | Description |
|---|---|---|---|
upcoming | boolean | ||
limit | number |
list_hub_lessons
Scope: hubs:read
List lessons in a classroom course (title, content, video_url, attachments, sort_order).
| Parameter | Type | Required | Description |
|---|---|---|---|
course_id | string | yes |
list_hub_members
Scope: hubs:read
List the connected hub's members with profile info. Filter by status (pending|approved|rejected|suspended|left). Use member ids with approve/reject/suspend/remove_hub_member.
| Parameter | Type | Required | Description |
|---|---|---|---|
status | pending | approved | rejected | suspended | left | ||
limit | number | ||
offset | number |
list_hub_moderators
Scope: hubs:read
List the connected hub's moderators with their permissions (approve_members, approve_products, edit_hub).
list_hub_resources
Scope: hubs:read
List the connected hub's resource-library items (links/files grouped by category).
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number |
list_hub_roles
Scope: hubs:read
List the connected hub's roles (id, slug, name, auto_approve, is_public).
list_hub_rooms
Scope: hubs:read
List the connected hub's video/voice rooms (persistent + scheduled) with their status and settings.
list_hub_tabs
Scope: hubs:read
List the connected hub's content tabs in display order (id, slug, name, module, config, sort_order, is_visible).
reject_hub_member
Scope: hubs:write
Reject a hub member application (optional reason shown to the applicant).
| Parameter | Type | Required | Description |
|---|---|---|---|
member_id | string | yes | |
reason | string |
remove_hub_member
Scope: hubs:write
Permanently remove a member from the hub.
| Parameter | Type | Required | Description |
|---|---|---|---|
member_id | string | yes |
remove_hub_membership_plan
Scope: hubs:write
Make the hub free to join by archiving its active paid plan.
remove_hub_moderator
Scope: hubs:write
Demote a moderator (removes the hub_moderators row).
| Parameter | Type | Required | Description |
|---|---|---|---|
moderator_id | string | yes |
remove_hub_tab
Scope: hubs:write
Remove a hub tab. Deleting a tab also removes the content that lives on it (e.g. an Events tab's events, a Resources tab's resources).
| Parameter | Type | Required | Description |
|---|---|---|---|
tab_id | string | yes |
reorder_hub_tabs
Scope: hubs:write
Set the display order of the hub's tabs. Pass tab_ids as the full ordered array of tab ids from list_hub_tabs.
| Parameter | Type | Required | Description |
|---|---|---|---|
tab_ids | string[] | yes |
set_hub_member_role
Scope: hubs:write
Assign a member to a role (or omit role_id to clear it). member_id from list_hub_members, role_id from list_hub_roles.
| Parameter | Type | Required | Description |
|---|---|---|---|
member_id | string | yes | |
role_id | string | Role id from list_hub_roles; omit or null to clear the member's role. |
set_hub_membership_plan
Scope: hubs:write
Set (or replace) the hub's paid membership plan. price_cents is in CENTS (min 100 = $1.00). billing one_time or subscription (subscription needs billing_interval month|year). lapse_behavior remove|downgrade.
| Parameter | Type | Required | Description |
|---|---|---|---|
billing | one_time | subscription | yes | |
price_cents | number | yes | |
currency | string | ||
billing_interval | month | year | ||
lapse_behavior | remove | downgrade |
set_hub_role_permissions
Scope: hubs:write
Replace a role's abilities. permissions is the full array of permission-tag slugs (from list_hub_catalog), e.g. ["can_view_directory","can_post_feed","can_create_events"]. Empty array clears them all.
| Parameter | Type | Required | Description |
|---|---|---|---|
role_id | string | yes | |
permissions | string[] | yes |
set_hub_role_requirements
Scope: hubs:write
Replace a role's join requirements (gating applicants must meet). requirements is the full ordered array of { rule_type, config }, rule_type a slug from list_hub_catalog (kyc_verified, email_verified, profile_complete, has_tag {tag_slug}, answers_custom_question {question,…}, min_account_age_days {days}). Empty array clears them.
| Parameter | Type | Required | Description |
|---|---|---|---|
role_id | string | yes | |
requirements | object[] | yes |
suspend_hub_member
Scope: hubs:write
Suspend an approved hub member (revokes access; reversible by re-approving).
| Parameter | Type | Required | Description |
|---|---|---|---|
member_id | string | yes |
update_hub
Scope: hubs:write
Edit the connected hub's profile & settings: name, description, short_description, logo_url, banner_url, visibility (public|private), category, business_description, hub_fee_percent (0–100 commission on hub sales), default_contract_id, and media (ordered gallery [{ id, type, url, thumbnail_url, caption }]). (Enabling commerce / status changes still go through the hub's review flow.)
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ||
description | string | ||
short_description | string | ||
logo_url | string | ||
banner_url | string | ||
visibility | public | private | ||
category | commerce | services | jobs | dating | community | other | ||
business_description | string | ||
hub_fee_percent | number | ||
default_contract_id | string | ||
media | object[] |
update_hub_course
Scope: hubs:write
Edit a classroom course (title, description, cover_url, sort_order). course_id from list_hub_courses.
| Parameter | Type | Required | Description |
|---|---|---|---|
course_id | string | yes | |
title | string | ||
description | string | ||
cover_url | string | ||
sort_order | number |
update_hub_discussion
Scope: hubs:write
Edit a discussion thread — title/body, pin/lock (moderation), or move to a category. discussion_id from list_hub_discussions.
| Parameter | Type | Required | Description |
|---|---|---|---|
discussion_id | string | yes | |
title | string | ||
body | string | ||
is_pinned | boolean | ||
is_locked | boolean | ||
category_id | string |
update_hub_event
Scope: hubs:write
Edit a hub event. event_id from list_hub_events.
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id | string | yes | |
title | string | ||
description | string | ||
location_type | online | in_person | ||
location | string | ||
starts_at | string | ||
ends_at | string | ||
cover_url | string |
update_hub_lesson
Scope: hubs:write
Edit a classroom lesson (title, content, video_url, attachments, sort_order). lesson_id from list_hub_lessons.
| Parameter | Type | Required | Description |
|---|---|---|---|
lesson_id | string | yes | |
title | string | ||
content | string | ||
video_url | string | ||
attachments | object[] | ||
sort_order | number |
update_hub_membership_plan
Scope: hubs:write
Patch the hub's ACTIVE paid membership plan in place (price, interval, granted role, lapse behavior). Use set_hub_membership_plan to create one, remove_hub_membership_plan to make the hub free.
| Parameter | Type | Required | Description |
|---|---|---|---|
billing | one_time | subscription | ||
price_cents | number | ||
currency | string | ||
billing_interval | month | year | ||
lapse_behavior | remove | downgrade | ||
grants_hub_role_id | string | Role granted while the membership is active. | |
lapse_role_id | string | Role to downgrade to when it lapses (if lapse_behavior=downgrade). |
update_hub_moderator
Scope: hubs:write
Update a moderator's permissions. moderator_id is the hub_moderators row id from list_hub_moderators.
| Parameter | Type | Required | Description |
|---|---|---|---|
moderator_id | string | yes | |
permissions | object |
update_hub_resource
Scope: hubs:write
Edit a resource in the hub library (title, description, url/file, category, order). resource_id from list_hub_resources.
| Parameter | Type | Required | Description |
|---|---|---|---|
resource_id | string | yes | |
title | string | ||
description | string | ||
category | string | ||
url | string | ||
file_url | string | ||
file_name | string | ||
icon | string | A Lucide icon name (e.g. 'BookOpen') or an image URL. | |
sort_order | number |
update_hub_role
Scope: hubs:write
Edit a hub role's fields (name, description, icon, color, auto_approve, is_public, sort_order). role_id from list_hub_roles.
| Parameter | Type | Required | Description |
|---|---|---|---|
role_id | string | yes | |
name | string | ||
description | string | ||
icon | string | ||
color | string | ||
auto_approve | boolean | ||
is_public | boolean | ||
sort_order | number |
update_hub_room
Scope: hubs:write
Edit a hub room (title, description, recording, schedule, access control). room_id from list_hub_rooms.
| Parameter | Type | Required | Description |
|---|---|---|---|
room_id | string | yes | |
title | string | ||
description | string | ||
mode | audio | video | ||
record_sessions | boolean | ||
scheduled_start | string | ||
scheduled_end | string | ||
require_approval | boolean | ||
track_attendance | boolean | ||
schedule | object | ||
allowed_roles | string[] | ||
allowed_members | string[] |
update_hub_tab
Scope: hubs:write
Edit a hub tab (name, icon, visibility, sort_order, or merge into its config). tab_id from list_hub_tabs.
| Parameter | Type | Required | Description |
|---|---|---|---|
tab_id | string | yes | |
name | string | ||
icon | string | ||
config | object | Merged into the existing config. | |
sort_order | number | ||
is_visible | boolean |