Skip to main content
Glama
getmasv

masv

Official

get_portal_packages

Get packages uploaded to MASV Portals with filters for status, name, sender, portal, tags, dates, teamspaces, expiry, and extra storage. Use this tool to retrieve portal-specific packages not including team packages.

Instructions

Get portal packages. These are packages uploaded by anyone to MASV Portals. Only packages that were uploaded to Portals returned by this tool. To get full list of packages you need to get both team packages and portal packages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number of paginated response. First page is 1
limitNoNumber of records returned per page
sortNoSort results ascending (fieldname) or descending (-fieldname)
statusNoSelect packages with status. New - package is currently uploading and not ready for view/download yet, finalized - package was uploaded and is ready for download, view, or transfer to another storage destination, expired and archived means that package was deleted and files are not available anymore
nameNoFilter packages by name
senderNoFilter packages by sender email
portalNoRetrieve records that belongs to the specified portal name
tagsNoFilter packages by tag id. If any of provided tag ids match package will be returned
created_at_startNoRetrieve records that were created after (YYYY-MM-DDTHH:mm:SS)
created_at_endNoRetrieve records that were created before (YYYY-MM-DDTHH:mm:SS)
teamspacesNoRetrieve records where teamspace id is equal to one of these values
expiry_startNoRetrieve records that expire after (YYYY-MM-DDTHH:mm:SS)
expiry_endNoRetrieve records that expire before (YYYY-MM-DDTHH:mm:SS)
extra_storageNoIf true, will only include packages which will or have already incurred extended storage costs

Implementation Reference

  • src/index.ts:103-119 (registration)
    Registration of the 'get_portal_packages' tool with server.registerTool, including description and schema binding to GetPortalPackagesSchema.shape
    server.registerTool(
      "get_portal_packages",
      {
        description:
          "Get portal packages. These are packages uploaded by anyone to MASV Portals. Only packages that were uploaded to Portals returned by this tool. To get full list of packages you need to get both team packages and portal packages.",
        inputSchema: GetPortalPackagesSchema.shape,
      },
      async (args) => {
        try {
          const data = await getPortalPackages(args);
    
          return mcpOk(data);
        } catch (error) {
          return mcpError(error);
        }
      },
    );
  • Zod schema definition for GetPortalPackagesSchema - input validation for page, limit, sort, status, name, sender, portal, tags, created_at_start, created_at_end, teamspaces, expiry_start, expiry_end, extra_storage
    const GetPortalPackagesSchema = z.object({
      page: z
        .number()
        .min(1)
        .describe("Page number of paginated response. First page is 1")
        .optional(),
      limit: z
        .number()
        .min(1)
        .max(100)
        .describe("Number of records returned per page")
        .optional(),
      sort: z
        .string()
        .describe("Sort results ascending (fieldname) or descending (-fieldname)")
        .optional(),
      status: z
        .array(z.enum(["new", "finalized", "expired", "archived"]))
        .describe(
          "Select packages with status. New - package is currently uploading and not ready for view/download yet, finalized - package was uploaded and is ready for download, view, or transfer to another storage destination, expired and archived means that package was deleted and files are not available anymore",
        )
        .optional(),
      name: z.string().describe("Filter packages by name").optional(),
      sender: z.string().describe("Filter packages by sender email").optional(),
      portal: z
        .string()
        .describe("Retrieve records that belongs to the specified portal name")
        .optional(),
      tags: z
        .array(z.string())
        .describe(
          "Filter packages by tag id. If any of provided tag ids match package will be returned",
        )
        .optional(),
      created_at_start: z
        .string()
        .describe("Retrieve records that were created after (YYYY-MM-DDTHH:mm:SS)")
        .optional(),
      created_at_end: z
        .string()
        .describe("Retrieve records that were created before (YYYY-MM-DDTHH:mm:SS)")
        .optional(),
      teamspaces: z
        .array(z.string())
        .describe(
          "Retrieve records where teamspace id is equal to one of these values",
        )
        .optional(),
      expiry_start: z
        .string()
        .describe("Retrieve records that expire after (YYYY-MM-DDTHH:mm:SS)")
        .optional(),
      expiry_end: z
        .string()
        .describe("Retrieve records that expire before (YYYY-MM-DDTHH:mm:SS)")
        .optional(),
      extra_storage: z
        .boolean()
        .describe(
          "If true, will only include packages which will or have already incurred extended storage costs",
        )
        .optional(),
    });
  • Core handler function getPortalPackages - fetches portal packages from MASV API at /v1.1/teams/{teamId}/inbox with query parameters and x-api-key auth header
    async function getPortalPackages({ page, ...params }: GetPortalPackagesParams) {
      const url = new URL(`${MASV_BASE_URL}/v1.1/teams/${MASV_TEAM_ID}/inbox`);
    
      Object.entries(params).forEach(([key, value]) => {
        if (value !== undefined) {
          url.searchParams.append(key, String(value));
        }
      });
    
      const headers = {
        "content-type": "application/json",
        "x-api-key": MASV_API_KEY,
      };
    
      const r = await fetch(url.toString(), { headers });
      const data = await r.json();
    
      return data;
    }
  • Type inference for GetPortalPackagesParams from the Zod schema
    type GetPortalPackagesParams = z.infer<typeof GetPortalPackagesSchema>;
  • Exports of GetPortalPackagesSchema and getPortalPackages from the packages module
    GetPortalPackagesSchema,
    getPortalPackages,
Behavior3/5

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

The description is basic and does not disclose behavioral traits beyond the fact that it returns portal-specific packages. Since no annotations are present, more detail (e.g., pagination, rate limits, side effects) would be expected. The current description is minimal but not misleading.

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, consisting of three short sentences with no unnecessary words. It efficiently conveys the tool's purpose and relationship to sibling tools.

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?

Given the 14-parameter schema and no output schema, the description is somewhat sparse. It does not mention pagination, response structure, or default behavior. For a list tool, additional context about returned fields or pagination would improve completeness.

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?

With 100% schema description coverage, the schema already documents all 14 parameters clearly. The description adds no additional meaning beyond the schema, so a 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 tool retrieves portal packages (packages uploaded to MASV Portals) and distinguishes it from team packages by explicitly noting that to get the full list, both must be fetched.

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

Usage Guidelines5/5

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

The description provides explicit guidance: use this tool for portal packages, and mentions that get_packages is needed for team packages to get the complete list. This directly addresses when to use this tool versus its sibling.

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