update_portal
Modify your portal's configuration to adjust access controls, branding, file restrictions, and other settings.
Instructions
Update an existing portal's configuration. Use this to modify portal settings like access controls, branding, file restrictions, and more.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| portalId | Yes | ID of the portal to update | |
| name | Yes | Portal name | |
| subdomain | Yes | Portal subdomain (3-53 characters) | |
| access_level | No | Portal access level: 'regular' for public access, 'private' for restricted access | |
| access_list | No | Array of membership IDs for users with direct access to private portal. Use get_team_members to retrieve membership IDs | |
| has_access_code | No | Whether portal requires an access code to upload (if true, you also need to specify access_code parameter) | |
| access_code | No | Access code for portal (required if has_access_code is true) | |
| has_download_password | No | Whether portal packages require password to download (if true, you also need to specify download_password parameter) | |
| download_password | No | Download password (required if has_download_password is true) | |
| message | No | Welcome message displayed on portal | |
| disable_upload_receipt | No | Disable email receipt to uploader | |
| active | No | Whether portal is active and accepting uploads | |
| recipients | No | Email addresses that receive notifications for portal uploads | |
| cc_recipients | No | Email addresses that receive carbon copy notifications without download link | |
| primary_color | No | Primary color for portal branding (hex color code) | |
| background_url | No | URL of background image for portal | |
| logo_url | No | URL of logo image for portal | |
| teamspace_id | No | ID of teamspace to associate portal with | |
| custom_expiry_days | No | Custom expiry days for packages (-1 for unlimited) | |
| expiry | No | Portal expiry date (ISO 8601 format). This parameter is required when expiry_enabled: true | |
| expiry_enabled | No | Whether portal expiry is enabled. If set to true, need to also provide expiry parameter, e.g. expiry: '2027-01-01'. | |
| file_type_restriction_enabled | No | Whether file type restrictions are enabled | |
| file_type_restriction_exclude | No | Whether to exclude (true) or include (false) specified file types | |
| file_types | No | Allowed/excluded file extensions prefixed with dots (e.g., ['.mp4', '.mov']) | |
| max_file_count | No | Maximum number of files per upload (0 for unlimited). Only works when package_size_restriction_enabled: true. | |
| max_file_size | No | Maximum file size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true. | |
| max_package_size | No | Maximum package size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true. | |
| package_size_restriction_enabled | No | Whether package size restrictions are enabled. Set to true in order to set max_file_count, max_file_size or max_package_size | |
| user_authentication_required | No | Whether to restrict Portal upload to only team users with proper access. Users must authenticate to upload | |
| download_user_authentication_required | No | Whether users must authenticate to download | |
| package_name_format_enabled | No | Whether custom package naming format is enabled | |
| package_name_format | No | Custom package naming format configuration (required when package_name_format_enabled is true) | |
| terms_of_service_enabled | No | Whether terms of service acceptance is required | |
| terms_of_service | No | Terms of service configuration (required when terms_of_service_enabled is true) |
Implementation Reference
- src/api/portals.ts:205-221 (handler)The actual handler function that executes the update_portal tool logic. It destructures portalId from params, makes a PUT request to the MASV API endpoint /v1/portals/{portalId} with the provided parameters, and returns the JSON response.
async function updatePortal({ portalId, ...params }: UpdatePortalParams) { const url = new URL(`${MASV_BASE_URL}/v1/portals/${portalId}`); const headers = { "content-type": "application/json", "x-api-key": MASV_API_KEY, }; const r = await fetch(url.toString(), { method: "PUT", headers, body: JSON.stringify(params), }); const data = await r.json(); return data; } - src/api/portals.ts:155-201 (schema)Zod schema (UpdatePortalSchema) defining the input validation for the update_portal tool. Requires portalId (string), name (string max 255), subdomain (3-53 chars), and many optional fields including access_level, access_code, download_password, branding settings, file restrictions, expiry settings, terms of service, etc.
const UpdatePortalSchema = z.object({ portalId: z.string().describe("ID of the portal to update"), name: z.string().max(255).describe("Portal name"), subdomain: z.string().min(3).max(53).describe("Portal subdomain (3-53 characters)"), access_level: z .enum(["regular", "private"]) .describe("Portal access level: 'regular' for public access, 'private' for restricted access") .optional(), access_list: z.array(z.string()).describe("Array of membership IDs for users with direct access to private portal. Use get_team_members to retrieve membership IDs").optional(), has_access_code: z.boolean().describe("Whether portal requires an access code to upload (if true, you also need to specify access_code parameter)").optional(), access_code: z.string().max(72).describe("Access code for portal (required if has_access_code is true)").optional(), has_download_password: z.boolean().describe("Whether portal packages require password to download (if true, you also need to specify download_password parameter)").optional(), download_password: z.string().max(72).describe("Download password (required if has_download_password is true)").optional(), message: z.string().describe("Welcome message displayed on portal").optional(), disable_upload_receipt: z.boolean().describe("Disable email receipt to uploader").optional(), active: z.boolean().describe("Whether portal is active and accepting uploads").optional(), recipients: z.array(z.string().email()).describe("Email addresses that receive notifications for portal uploads").optional(), cc_recipients: z.array(z.string().email()).describe("Email addresses that receive carbon copy notifications without download link").optional(), primary_color: z.string().max(255).describe("Primary color for portal branding (hex color code)").optional(), background_url: z.string().describe("URL of background image for portal").optional(), logo_url: z.string().describe("URL of logo image for portal").optional(), teamspace_id: z.string().describe("ID of teamspace to associate portal with").optional(), custom_expiry_days: z.number().int().min(-1).max(65535).describe("Custom expiry days for packages (-1 for unlimited)").optional(), expiry: z.string().describe("Portal expiry date (ISO 8601 format). This parameter is required when expiry_enabled: true").optional(), expiry_enabled: z.boolean().describe("Whether portal expiry is enabled. If set to true, need to also provide expiry parameter, e.g. expiry: '2027-01-01'.").optional(), file_type_restriction_enabled: z.boolean().describe("Whether file type restrictions are enabled").optional(), file_type_restriction_exclude: z.boolean().describe("Whether to exclude (true) or include (false) specified file types").optional(), file_types: z.array(z.string()).describe("Allowed/excluded file extensions prefixed with dots (e.g., ['.mp4', '.mov'])").optional(), max_file_count: z.number().int().describe("Maximum number of files per upload (0 for unlimited). Only works when package_size_restriction_enabled: true.").optional(), max_file_size: z.number().int().describe("Maximum file size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true.").optional(), max_package_size: z.number().int().describe("Maximum package size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true.").optional(), package_size_restriction_enabled: z.boolean().describe("Whether package size restrictions are enabled. Set to true in order to set max_file_count, max_file_size or max_package_size").optional(), user_authentication_required: z.boolean().describe("Whether to restrict Portal upload to only team users with proper access. Users must authenticate to upload").optional(), download_user_authentication_required: z.boolean().describe("Whether users must authenticate to download").optional(), package_name_format_enabled: z.boolean().describe("Whether custom package naming format is enabled").optional(), package_name_format: z.object({ value: z.string().describe("Regex pattern used to enforce package name format (e.g., '*Video*')"), label: z.string().describe("Label shown to users explaining the required package name format (e.g., 'Format For Videos')"), }).describe("Custom package naming format configuration (required when package_name_format_enabled is true)").optional(), terms_of_service_enabled: z.boolean().describe("Whether terms of service acceptance is required").optional(), terms_of_service: z.object({ title: z.string().describe("Title of the terms of service"), description: z.string().describe("Description or content of the terms of service"), checkbox_label: z.string().describe("Label for the acceptance checkbox"), checkbox_url: z.string().describe("URL to full terms of service document"), }).describe("Terms of service configuration (required when terms_of_service_enabled is true)").optional(), }); - src/index.ts:370-386 (registration)Registration of the 'update_portal' tool with the MCP server. Provides the description, ties the input schema (UpdatePortalSchema.shape) to validation, and wraps the async handler that calls updatePortal(args), returning mcpOk on success or mcpError on failure.
server.registerTool( "update_portal", { description: "Update an existing portal's configuration. Use this to modify portal settings like access controls, branding, file restrictions, and more.", inputSchema: UpdatePortalSchema.shape, }, async (args) => { try { const data = await updatePortal(args); return mcpOk(data); } catch (error) { return mcpError(error); } }, ); - src/mcp-responses.ts:1-14 (helper)Helper function mcpOk used by the tool registration handler to format a successful JSON response with the portal data.
export function mcpOk(data: object | string) { return { content: [ { type: "text" as const, text: typeof data === "string" ? data : JSON.stringify(data, null, 2), }, ], }; } export function mcpError(data: unknown) { const message = data instanceof Error ? data.message : String(data); - src/mcp-responses.ts:12-19 (helper)Helper function mcpError used by the tool registration handler to format error responses.
export function mcpError(data: unknown) { const message = data instanceof Error ? data.message : String(data); return { isError: true, content: [{ type: "text" as const, text: message }], }; }