# Tools · Community and structure

> MCP tools for the community's structure: the connection's context, sections and spaces, opening a link copied from the app, creating, editing, reordering and deleting sections and spaces, who sees each one, moving a space to another section, the community settings (including the language) and the e-mail for sale notices.

The starting point of every conversation and the shape of the community: which community and role the assistant is in, which sections and spaces exist, and creating, reordering, adjusting or deleting that structure, including who sees each space. This is also where the assistant understands a link you paste into the conversation, and where it views and changes the community settings (name, colors, logo, SEO, language and entry rules) and the e-mail that receives sale notices.

Each tool carries a badge: <span class="tool-kind tool-kind-read">Read-only</span> changes nothing, <span class="tool-kind tool-kind-write">Changes</span> creates or changes something right away, and <span class="tool-kind tool-kind-confirm">Asks to confirm</span> only acts after your yes to a summary. See [Money and confirmation](/mcp/dinheiro-e-confirmacao).

## In short

| Tool | What it does | Minimum role | Type |
|---|---|---|---|
| [`get_community_context`](#get-community-context) | Community, role, sections and spaces with ids: the starting point | Any | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`get_connection_diagnostics`](#get-connection-diagnostics) | Whether the assistant's tool list is up to date | Admin | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`list_spaces`](#list-spaces) | Sections and spaces, filterable by module | Any | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`open_link`](#open-link) | Says what a link copied from the app (or an id) is | Any | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`create_section`](#create-section) | Creates a menu section | Admin | <span class="tool-kind tool-kind-write">Changes</span> |
| [`create_space`](#create-space) | Creates a space in a section | Admin | <span class="tool-kind tool-kind-write">Changes</span> |
| [`update_space`](#update-space) | Changes a space's name, description, icon or visibility, or moves it to another section | Admin | <span class="tool-kind tool-kind-write">Changes</span> |
| [`update_section`](#update-section) | Changes a section's name, description or icon, or makes it the home section | Admin | <span class="tool-kind tool-kind-write">Changes</span> |
| [`reorder_sections`](#reorder-sections) | Puts the menu sections in a new order | Admin | <span class="tool-kind tool-kind-write">Changes</span> |
| [`reorder_spaces`](#reorder-spaces) | Puts a section's spaces in a new order | Admin | <span class="tool-kind tool-kind-write">Changes</span> |
| [`update_space_access`](#update-space-access) | Who sees a space or a section, and who posts in the space | Admin | <span class="tool-kind tool-kind-write">Changes</span> |
| [`delete_section`](#delete-section) | Deletes a section and its spaces | Admin | <span class="tool-kind tool-kind-confirm">Asks to confirm</span> |
| [`delete_space`](#delete-space) | Deletes a space | Admin | <span class="tool-kind tool-kind-confirm">Asks to confirm</span> |
| [`get_community_settings`](#get-community-settings) | The community's settings: name, colors, images, SEO, language, entry | Admin | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`update_community_settings`](#update-community-settings) | Changes name, colors, logo, favicon, SEO, language and entry rules | Admin | <span class="tool-kind tool-kind-write">Changes</span> |
| [`get_notification_settings`](#get-notification-settings) | The e-mail that receives sale notices | Admin | <span class="tool-kind tool-kind-read">Read-only</span> |
| [`update_notification_settings`](#update-notification-settings) | Changes or turns off the sale notices e-mail | Admin | <span class="tool-kind tool-kind-write">Changes</span> |

## `get_community_context`

<span class="tool-kind tool-kind-read">Read-only</span>

**Community context.** The starting point: says which community the connection is in, with which role, and lists the sections and spaces with their ids. *Minimum role: any.*

Parameters: none.

**Returns:** the community (id, name, address), you (role and name), the connection's scopes (`read`, `write`), the sections (id, title, whether it's the home section, visibility) with each section's spaces (id, title, module, visibility), the order in which things need to be created, and the icons available for spaces (`available_icons`, with what each one is for).

**Ask like this:** *"Which community are you connected to, and with what role?"* · *"What spaces does the community have?"*

**Notes:** assistants usually call this tool on their own at the start of each conversation. The creation order it returns is the same as in [Creation order](/api/ordem-de-criacao).

## `list_spaces`

<span class="tool-kind tool-kind-read">Read-only</span>

**List sections and spaces.** The sections and spaces, with id, module and visibility, filterable by module. *Minimum role: any; each person sees what they can see.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `module` | text | No | `feed`, `content`, `courses`, `events`, `storefront`, `gallery`… Returns only the sections that have spaces of that module |

**Returns:** the sections with their spaces, as in `get_community_context`.

**Ask like this:** *"Which one is the courses space?"* · *"List the event spaces."*

## `open_link`

<span class="tool-kind tool-kind-read">Read-only</span>

**Open an app link.** Takes a link from your community (or a bare id or slug) and says what it is, with its id, title, space and a summary. *Minimum role: any.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `link` | text | Yes | The app address, a path such as `/aprender/cursos/excel`, an id or a slug |

It understands the app's addresses: space (`/section/space`), post, event, course, certificate (from inside the space or from the public verification page), call for papers and proposal (`?proposal=`), plan (`/pricing/…`) and subscription (`/billing?subscription=…`), including the old addresses the app redirects.

**Ask like this:** *"What is this link? https://yourcommunity.com/aprender/cursos/excel-do-zero"*

**Notes:** it only works with links from the connected community. A link from another community comes back as *"That link belongs to another community"*, even if you manage both: connect the other one separately.

## `create_section`

<span class="tool-kind tool-kind-write">Changes</span>

**Create section.** Creates a menu section, such as *Learn* or *Community*. Spaces live inside sections. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `title` | text, up to 255 | Yes | The name in the menu |
| `description` | plain text | No | No formatting: Markdown marks are stripped |
| `visibility` | `public`, `members`, `plan`, `private` | No | Who sees the section. See [Visibility and access](/conceitos/visibilidade-e-acesso) |

**Returns:** the new section, with the id `create_space` needs.

**Ask like this:** *"Create a section called Learn, visible to members only."*

## `create_space`

<span class="tool-kind tool-kind-write">Changes</span>

**Create space.** Creates a space in a section, with the module that defines what it is. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `section_id` | id | Yes | From `get_community_context` or `create_section` |
| `title` | text, up to 255 | Yes | |
| `module` | `feed`, `content`, `courses`, `events`, `storefront`, `gallery`, `ranking`, `url`, `certificates`, `call4papers` | Yes | Feed, Content, Courses, Events, Store, Gallery, Ranking, Link, Certificates or Call for papers. See [Modules](/conceitos/modulos) |
| `external_url` | web address | No | Only for the `url` module: the address the space opens |
| `icon` | one of the icons in the list | No | The space's icon. See [Icons](#icons). Without it, Memberfy picks one from the title and the module |
| `description` | plain text | No | No formatting: Markdown marks are stripped |
| `visibility` | `public`, `members`, `plan`, `private` | No | |

**Returns:** the created space, with its id and icon.

**Ask like this:** *"Create a Feed space called Announcements in the Community section, with the megaphone icon."*

**Notes:** for a complete course or event, `create_course` and `create_event` create the space along with it. In a Call for papers space, the suggested next step is opening the first call ([`create_call_for_papers`](/mcp/ferramentas-chamada#create-call-for-papers)). Spaces have no cover image.

## `update_space`

<span class="tool-kind tool-kind-write">Changes</span>

**Edit space.** Changes the name, description, icon or visibility of an existing space, or moves it to another section. Only what is sent changes. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `space_id` | id | Yes | From `list_spaces` |
| `title` | text, up to 255 | No | |
| `description` | plain text | No | No formatting: Markdown marks are stripped |
| `icon` | one of the icons in the list | No | The space's icon. See [Icons](#icons). Without it, Memberfy picks one from the title and the module |
| `visibility` | `public`, `members`, `plan`, `private` | No | For a private space with groups, products or plans, use [`update_space_access`](#update-space-access) |
| `section_id` | id | No | Moves the space to this section |

**Returns:** the updated space.

**Ask like this:** *"Swap the icon of the Jobs space for a briefcase."* · *"Give each space in the Learn section a different icon, matching its theme."*

## `update_section`

<span class="tool-kind tool-kind-write">Changes</span>

**Edit section.** Renames a menu section, changes its description or icon, or makes it the home section. Only what is sent changes. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `section` | id, address or name | Yes | From `get_community_context` |
| `title` | text, up to 255 | No | |
| `description` | plain text | No | No formatting: Markdown marks are stripped |
| `icon` | text | No | |
| `is_home` | yes or no | No | The section that opens first |

**Ask like this:** *"Rename the Learn section to Courses and make it the home section."*

**Notes:** who sees the section changes with [`update_space_access`](#update-space-access).

## `reorder_sections`

<span class="tool-kind tool-kind-write">Changes</span>

**Reorder sections.** Puts the menu sections in a new order, top to bottom. The ones left out keep their order, after these. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `section_ids` | list of ids | Yes | From `get_community_context`, in the new order |

**Ask like this:** *"Put the Events section right after Community."*

## `reorder_spaces`

<span class="tool-kind tool-kind-write">Changes</span>

**Reorder spaces.** Puts a section's spaces in a new order. The ones left out keep their order, after these. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `section` | id, address or name | Yes | The section |
| `space_ids` | list of ids | Yes | From `list_spaces`, in the new order |

**Ask like this:** *"In the Learn section, put the Excel from Scratch space first."*

**Notes:** to move a space to another section, use [`update_space`](#update-space) with `section_id`.

## `update_space_access`

<span class="tool-kind tool-kind-write">Changes</span>

**Change who sees a space.** Sets who sees a space or a whole section and, in a space, who can post. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `space` or `section` | id, link, address or name | One of the two | The space or the section |
| `visibility` | `public`, `members`, `plan`, `private` | No | Public, members, any active subscription, or private |
| `group_ids` | list of ids | No | When private: the groups that get in (from `list_groups`) |
| `product_ids` | list of ids | No | When private: the products whose purchase unlocks it (from `list_products`) |
| `plan_ids` | list of ids | No | When private: the plans whose subscription unlocks it (from `list_plans`) |
| `can_create` | `anyone`, `staff`, `admins` | No | Space only: **Anyone**, **Staff** or **Admins** can post |

**Returns:** the updated space or section.

**Ask like this:** *"Make the Excel from Scratch space visible only to people who bought the course product or subscribe to the Student plan."*

**Notes:** the groups, products and plans you send replace the ones that were there; any one of them is enough for a person to get in. A space is never more open than its section. It changes who sees what right away: ask the assistant to show you what will change first, if you want to check. See [Visibility and access](/conceitos/visibilidade-e-acesso).

## `delete_section`

<span class="tool-kind tool-kind-confirm">Asks to confirm</span>

**Delete section.** Deletes a menu section and the spaces in it. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `section` | id, address or name | Yes | |

**Returns:** on the first call, the section and the list of spaces that go with it, and the confirmation code.

## `delete_space`

<span class="tool-kind tool-kind-confirm">Asks to confirm</span>

**Delete space.** Deletes a space, and what it holds, from the menu. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `space` | id, link, address or name | Yes | |

**Returns:** on the first call, the space, the module and the section, and the confirmation code.

## `get_community_settings`

<span class="tool-kind tool-kind-read">Read-only</span>

**View community settings.** The community's settings as they are. *Minimum role: admin.*

Parameters: none.

**Returns:** the name, the description, the colors (primary and secondary in hex, and the full scale), the logo, the favicon, the sharing image, the SEO, the entry rules (open sign-up, sign-up model, visitors), moderation and ranking. Nothing secret, such as integrations or DNS.

**Ask like this:** *"What are the community's colors and SEO right now?"*

## `update_community_settings`

<span class="tool-kind tool-kind-write">Changes</span>

**Change community settings.** Changes the settings; only what is sent changes. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name`, `description` | text | No | The community's name and description |
| `primary_color`, `secondary_color` | hex color (`#RRGGBB`) | No | The whole scale, from 50 to 950, is generated from them. See [Colors](/configuracoes/cores) |
| `reset_colors` | yes or no | No | Goes back to the product's default colors |
| `mobile_bar_color` | hex color | No | The color of the browser bar on phones |
| `seo_title`, `seo_description` | text | No | See [Images and SEO](/configuracoes/imagens-e-seo) |
| `signup_open` | yes or no | No | Anyone can sign up |
| `signup_model` | `FREE`, `PAID` | No | |
| `guest_access` | yes or no | No | Visitors see what is public |
| `content_moderation` | yes or no | No | |
| `global_ranking` | yes or no | No | |
| `language` | `pt-BR`, `pt-PT`, `en-US`, `es-ES`, `es-MX`, `es-AR`, `it-IT`, `de-DE`, `de-AT`, `de-CH` | No | The community's language: the one used for e-mails and for anyone who hasn't picked a language yet. See [Languages](/configuracoes/idiomas) |
| `linkedin_id` | number | No | The community's LinkedIn page ID, for certificates |
| `logo_url` or `logo_base64` | link or file | No | The logo |
| `favicon_url` or `favicon_base64` | link or file | No | The favicon |
| `share_image_url` or `share_image_base64` | link or file | No | The image shown when someone shares the link |

**Returns:** the applied settings, with the **before → after** of each field.

**Ask like this:** *"Change the primary color to #4F46E5 and use this logo: https://…"*

**Notes:** all of this shows to the whole community as soon as the call runs; to undo it, ask again with the old value, which is in the **before → after**. Domain and integrations can't be changed here. See [General settings](/configuracoes/configuracoes-gerais).

## `get_notification_settings`

<span class="tool-kind tool-kind-read">Read-only</span>

**See sale notices.** Where the community's notices go: the e-mail that receives a notice for every sale. *Minimum role: admin.*

Parameters: none.

**Ask like this:** *"Who gets the notice when a sale comes in?"*

## `update_notification_settings`

<span class="tool-kind tool-kind-write">Changes</span>

**Change sale notices e-mail.** Sets the e-mail that receives a notice for every sale. *Minimum role: admin.*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `sales_notification_email` | e-mail | Yes | Empty (`""`) turns the notices off |

**Ask like this:** *"Send the sale notices to finance\@memberfy.net."*

See [Sales notices](/notificacoes/avisos-de-venda).

## Icons

Spaces use the same icons as the dashboard picker. The assistant gets the list with what each one is for (in `get_community_context`, field `available_icons`, and in the tool descriptions) and is told to pick by theme, without always repeating the same one. If it doesn't pick, Memberfy picks from the title (*Live schedule* gets `calendar`, *Jobs* gets `briefcase`) or, with no clue in the title, from the module (Courses gets `book-open`, Gallery gets `image`).

Some examples: `calendar` (events, schedule), `book-open` (courses, lessons), `graduation-cap` (training, mentoring), `megaphone` (announcements), `message-square` (forum, questions), `briefcase` (career, jobs), `image` (gallery, photos), `trophy` (ranking, challenges), `shopping-bag` (store), `crown` (premium, VIP), `lock` (private).

## `get_connection_diagnostics`

<span class="tool-kind tool-kind-read">Read-only</span>

**Connection diagnostics.** Tells whether the tool list the assistant is using is up to date. *Minimum role: admin (owner or admin).*

| Parameter | Type | Required | Description |
|---|---|---|---|
| `connection_id` | id | No | Without it, this conversation's connection |

**Returns:** the assistant, who authorized it and when, the server version and the list the connection would get now (the list's code and how many tools), what it received last time, the last call and the last attempt to use a tool it doesn't have, and `listUpToDate`. When `listUpToDate` is false, the assistant has the old list: open a new conversation or reconnect the connector.

**Ask like this:** *"One of your calls failed. Is your Memberfy tool list up to date?"*

## Related

- [Tools](/mcp/ferramentas)
- [Recipes](/mcp/receitas)
- [Money and confirmation](/mcp/dinheiro-e-confirmacao)
