Skip to main content
Glama
getmasv

masv

Official

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

TableJSON Schema
NameRequiredDescriptionDefault
portalIdYesID of the portal to update
nameYesPortal name
subdomainYesPortal subdomain (3-53 characters)
access_levelNoPortal access level: 'regular' for public access, 'private' for restricted access
access_listNoArray of membership IDs for users with direct access to private portal. Use get_team_members to retrieve membership IDs
has_access_codeNoWhether portal requires an access code to upload (if true, you also need to specify access_code parameter)
access_codeNoAccess code for portal (required if has_access_code is true)
has_download_passwordNoWhether portal packages require password to download (if true, you also need to specify download_password parameter)
download_passwordNoDownload password (required if has_download_password is true)
messageNoWelcome message displayed on portal
disable_upload_receiptNoDisable email receipt to uploader
activeNoWhether portal is active and accepting uploads
recipientsNoEmail addresses that receive notifications for portal uploads
cc_recipientsNoEmail addresses that receive carbon copy notifications without download link
primary_colorNoPrimary color for portal branding (hex color code)
background_urlNoURL of background image for portal
logo_urlNoURL of logo image for portal
teamspace_idNoID of teamspace to associate portal with
custom_expiry_daysNoCustom expiry days for packages (-1 for unlimited)
expiryNoPortal expiry date (ISO 8601 format). This parameter is required when expiry_enabled: true
expiry_enabledNoWhether portal expiry is enabled. If set to true, need to also provide expiry parameter, e.g. expiry: '2027-01-01'.
file_type_restriction_enabledNoWhether file type restrictions are enabled
file_type_restriction_excludeNoWhether to exclude (true) or include (false) specified file types
file_typesNoAllowed/excluded file extensions prefixed with dots (e.g., ['.mp4', '.mov'])
max_file_countNoMaximum number of files per upload (0 for unlimited). Only works when package_size_restriction_enabled: true.
max_file_sizeNoMaximum file size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true.
max_package_sizeNoMaximum package size in bytes (0 for unlimited). Only works when package_size_restriction_enabled: true.
package_size_restriction_enabledNoWhether package size restrictions are enabled. Set to true in order to set max_file_count, max_file_size or max_package_size
user_authentication_requiredNoWhether to restrict Portal upload to only team users with proper access. Users must authenticate to upload
download_user_authentication_requiredNoWhether users must authenticate to download
package_name_format_enabledNoWhether custom package naming format is enabled
package_name_formatNoCustom package naming format configuration (required when package_name_format_enabled is true)
terms_of_service_enabledNoWhether terms of service acceptance is required
terms_of_serviceNoTerms of service configuration (required when terms_of_service_enabled is true)

Implementation Reference

  • 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;
    }
  • 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);
        }
      },
    );
  • 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);
  • 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 }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully convey behavioral traits. It only states 'Update' (mutation), but lacks details on required permissions, side effects, idempotency, error behavior, or potential data loss. With 34 parameters, the description offers no guidance on how updates interact with existing settings.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that efficiently states the main use. It earns its place without redundancy. However, it could be structured into bullet points for better readability given the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having 34 parameters, no output schema, and no annotations, the description is too minimal. It does not explain return values (e.g., the updated portal object), how to verify success, or common constraints (e.g., partial updates). For such a complex tool, the description is insufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% parameter description coverage, so the schema already explains each parameter. The description adds conceptual grouping ('like access controls, branding, file restrictions') but does not provide deeper semantics beyond what the schema offers. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update an existing portal's configuration') and the resource ('portal settings'), distinguishing it from creation (create_portal) and deletion (delete_portal) tools. It lists specific settings like access controls, branding, and file restrictions, which precisely conveys the tool's purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for modifying an existing portal, but it does not explicitly state when not to use it or suggest alternatives like create_portal for new portals or delete_portal for removal. However, given the sibling context, the intent is reasonably clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/getmasv/masv-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server