Skip to main content
Glama
getmasv

masv

Official

update_package_expiration_date_and_time

Set or change a package's expiration date and time, and toggle unlimited storage. Disabling unlimited storage requires an expiration date. Expired packages are permanently deleted.

Instructions

Update package expiration date and time. Also allows enable or disable unlimited storage. Additional package storage may incur charges, depending on your team subscription plan. Once expired the package and all of its files are deleted and can not be restored.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageIdYesId of the package to update expiry date for
unlimited_storageYesSpecifies if unlimited storage is enabled or disabled for a package. If disabling unlimited storage expiry parameter must be set
expiryNoThe date and time on which the package will expire in UTC (ISO 8601 format). When setting expiry unlimited_storage parameter should be false

Implementation Reference

  • UpdatePackageExpiryDateSchema - Zod schema defining the input parameters for the tool: packageId (string), unlimited_storage (boolean), and optional expiry (ISO 8601 datetime).
    const UpdatePackageExpiryDateSchema = z.object({
      packageId: z.string().describe("Id of the package to update expiry date for"),
      unlimited_storage: z
        .boolean()
        .describe(
          "Specifies if unlimited storage is enabled or disabled for a package. If disabling unlimited storage expiry parameter must be set",
        ),
      expiry: z.iso
        .datetime()
        .describe(
          "The date and time on which the package will expire in UTC (ISO 8601 format). When setting expiry unlimited_storage parameter should be false",
        )
        .optional(),
    });
  • updatePackageExpiry - The main handler function that takes packageId, unlimited_storage, and optional expiry. It gets a package token, then PUTs to /v1/packages/{packageId}/expiry with the appropriate body (either unlimited_storage:true, or unlimited_storage:false with expiry set).
    async function updatePackageExpiry({
      packageId,
      unlimited_storage,
      expiry,
    }: UpdatePackageExpiryDateSchemaParams) {
      const packageToken = await getPackageToken(packageId);
    
      const url = new URL(`${MASV_BASE_URL}/v1/packages/${packageId}/expiry`);
    
      const headers = {
        "content-type": "application/json",
        "x-package-token": packageToken,
      };
    
      let body;
    
      if (unlimited_storage == true) {
        if (expiry) {
          throw new Error(
            "Can not set both unlimited_storage: true and expiration date. If you want to enable unlimited storage please only pass unlimited_storage parameter",
          );
        }
    
        body = {
          unlimited_storage: true,
        };
      } else {
        if (!expiry)
          throw new Error(
            "expiry parameter must be provided if unlimited storage is disabled",
          );
    
        body = {
          unlimited_storage: false,
          expiry,
        };
      }
    
      const r = await fetch(url.toString(), {
        method: "PUT",
        headers,
        body: JSON.stringify(body),
      });
      const data = await r.json();
    
      return data;
    }
  • src/index.ts:156-172 (registration)
    server.registerTool('update_package_expiration_date_and_time', ...) - Registers the tool with the MCP server, linking the schema (UpdatePackageExpiryDateSchema.shape) to the handler callback that calls updatePackageExpiry and formats the response via mcpOk/mcpError.
    server.registerTool(
      "update_package_expiration_date_and_time",
      {
        description:
          "Update package expiration date and time. Also allows enable or disable unlimited storage. Additional package storage may incur charges, depending on your team subscription plan. Once expired the package and all of its files are deleted and can not be restored.",
        inputSchema: UpdatePackageExpiryDateSchema.shape,
      },
      async (args) => {
        try {
          const data = await updatePackageExpiry(args);
    
          return mcpOk(data);
        } catch (error) {
          return mcpError(error);
        }
      },
    );
  • src/index.ts:16-17 (registration)
    Import of UpdatePackageExpiryDateSchema and updatePackageExpiry from ./api/packages.js.
    UpdatePackageExpiryDateSchema,
    updatePackageExpiry,
  • Export of UpdatePackageExpiryDateSchema and updatePackageExpiry from the packages module.
    UpdatePackageExpiryDateSchema,
    updatePackageExpiry,
Behavior3/5

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

The description discloses that expired packages and files are deleted permanently, which is critical behavioral information. It does not cover authorization, rate limits, or other side effects. With no annotations, it partially fulfills transparency but leaves some gaps.

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

Conciseness5/5

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

The description is concise with three sentences, front-loading the main purpose. Each sentence adds essential information (action, storage toggle, consequences), with no unnecessary words.

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

Completeness3/5

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

The description covers the main action, parameter relationships, and the critical consequence. However, it lacks information on return values (no output schema), usage guidelines, and prerequisites, making it partially complete for the tool's moderate complexity.

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

Parameters4/5

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

The input schema has 100% description coverage. The description adds value by clarifying that unlimited_storage enables/disables storage and stating the constraint that expiry requires unlimited_storage to be false, going beyond the schema.

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 it updates expiration date/time and toggles unlimited storage, using a specific verb and resource. It distinguishes from sibling tools like delete_package or get_package by specifying the update action on expiration and storage settings.

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

Usage Guidelines3/5

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

The description provides context about charges and permanent data loss on expiration, helping the agent understand impact. However, it does not explicitly state when to use this tool versus other package-related tools, nor does it mention alternatives or prerequisites.

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