Project tools of the MCP server
The 11 tools that work on the project itself: its configuration and settings, its users and its permission profiles. How to connect, and how results and errors come back, is in Connecting a client.
These tools can create administrators and delete accounts. That is the reason the MCP token has to be kept as an administrator credential.
Roles are user, admin and superadmin. What a user can see and do comes from the user's profile: each role has a default profile, and custom profiles can be created.
Configuration and settings
project_config
The configuration the server works with: project id, storage bucket, region, whether the installation runs online or offline, any override of the addresses of the API functions, the address of the training service, and the identity the server is signed in as. Takes no parameters.
project_settings
The general settings of the project (idle and SSO timeouts), or the settings of one view of the application.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
viewId | string | no | Return the settings of this view instead of the general ones |
param | string | no | With viewId: return only this field |
settings_update
Updates the general settings. Only the fields passed change.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
data | object | yes | The fields to change |
Users
The user tools work on the user records of the project. user_update and user_delete answer user <uid> not found for an account that has no record yet: run user_list with synchronize: true first.
user_list
The users of the project with their role and profile.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
synchronize | boolean | no | Cloud only. First bring the user records in line with the accounts of the project: records are rewritten, and the record of a user without account is deleted |
role | role | no | Only users with this role |
user_get
One user, by uid or by email, with the access that results from the role and the profile: views and permissions. One of the two parameters is required.
| Parameter | Type | Required |
|---|---|---|
uid | string | one of the two |
email | string | one of the two |
registered in the result tells whether the user has a record in the project.
user_create
Creates a user who can sign in. The call fails if a user with that email exists.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
email | string | yes | |
password | string | yes | At least 6 characters |
displayName | string | no | Default: the email |
role | role | no | Default user. Ignored when profileId is given: the role then comes from the profile |
profileId | string | no | Default: the default profile of the role. A profile that does not exist is refused |
user_update
Changes the email, the name, the password, the role or the profile of a user.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
uid | string | yes | |
email | string | no | |
displayName | string | no | |
password | string | no | At least 6 characters |
role | role | no | Without profileId, the user also gets the default profile of this role. Ignored when profileId is given |
profileId | string | no |
user_delete
Destructive. Deletes a user: the account and its record. The server refuses to delete the identity it is signed in as.
| Parameter | Type | Required |
|---|---|---|
uid | string | yes |
confirm | boolean | yes, true |
Permission profiles
profile_list
The permission profiles, default and custom, each with its role and its permissions. Takes no parameters.
profile_update
Creates a profile or updates an existing one.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
profileId | string | yes | |
name | string | no | |
role | role | no | |
permissions | object | no | { "views": [...], "actions": {...}, "manageProfiles": [...] } |
On an existing profile, permissions is merged with the stored one: the lists views and manageProfiles replace the stored lists when they are passed, and actions is merged key by key.
profile_delete
Destructive. Deletes a custom profile. Default profiles, and profiles that are assigned to users, are refused.
| Parameter | Type | Required |
|---|---|---|
profileId | string | yes |
confirm | boolean | yes, true |