Skip to main content
Glama
getmasv

masv

Official

get_portals

Retrieve a paginated list of team portals configured for file collection from external users. Filter by name, subdomain, tags, or teamspaces, and sort by name, creation date, or active status.

Instructions

Get list of portals that belong to the team. Portals are used to collect files from external users. Each portal has a unique subdomain and can be configured with various settings like upload and download password, file type restrictions, connected integrations, metadata forms, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number of paginated response. First page is 1
limitNoNumber of records returned per page
sortNoSort results by field. Use field name for ascending order or prefix with '-' for descending (e.g., 'name' or '-created_at')
nameNoFilter portals by name
subdomainNoFilter portals by subdomain
tagsNoFilter portals by tag id. If any of provided tag ids match portal will be returned
teamspacesNoRetrieve records where teamspace id is equal to one of these values

Implementation Reference

  • The getPortals function that implements the tool logic. It constructs a URL with query parameters (page, limit, sort, and filters like name, subdomain, tags, teamspaces), then fetches data from the MASV API and returns the JSON response.
    async function getPortals({ page, limit, sort, ...params }: GetPortalsParams) {
        const url = new URL(`${MASV_BASE_URL}/v1.1/teams/${MASV_TEAM_ID}/portals`);
    
        if (page !== undefined) url.searchParams.append("page", String(page));
        if (limit !== undefined) url.searchParams.append("limit", String(limit));
        if (sort !== undefined) url.searchParams.append("sort", sort);
    
        Object.entries(params).forEach(([key, value]) => {
            if (value !== undefined) {
                if (Array.isArray(value)) {
                    value.forEach((v) => url.searchParams.append(key, String(v)));
                } else {
                    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;
    }
  • The GetPortalsSchema Zod schema defining input parameters: page (number, min 1), limit (number, 1-100), sort (enum of name/-name/created_at/-created_at/active/-active), name, subdomain, tags (array of strings), and teamspaces (array of strings).
    const GetPortalsSchema = 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
            .enum(["name", "-name", "created_at", "-created_at", "active", "-active"])
            .describe(
                "Sort results by field. Use field name for ascending order or prefix with '-' for descending (e.g., 'name' or '-created_at')",
            )
            .optional(),
        name: z.string().describe("Filter portals by name").optional(),
        subdomain: z.string().describe("Filter portals by subdomain").optional(),
        tags: z
            .array(z.string())
            .describe(
                "Filter portals by tag id. If any of provided tag ids match portal will be returned",
            )
            .optional(),
        teamspaces: z
            .array(z.string())
            .describe(
                "Retrieve records where teamspace id is equal to one of these values",
            )
            .optional(),
    });
  • src/index.ts:316-331 (registration)
    Registration of the 'get_portals' tool with the MCP server. Registers the tool name, description, input schema (from GetPortalsSchema.shape), and handler that calls getPortals(args) and returns the result via mcpOk.
    server.registerTool(
      "get_portals",
      {
        description:
          "Get list of portals that belong to the team. Portals are used to collect files from external users. Each portal has a unique subdomain and can be configured with various settings like upload and download password, file type restrictions, connected integrations, metadata forms, etc.",
        inputSchema: GetPortalsSchema.shape,
      },
      async (args) => {
        try {
          const data = await getPortals(args);
    
          return mcpOk(data);
        } catch (error) {
          return mcpError(error);
        }
      },
  • The MASV_BASE_URL, MASV_TEAM_ID, and MASV_API_KEY environment variables used by the getPortals handler to construct the API request URL and headers.
    export const MASV_BASE_URL = process.env.MASV_BASE_URL || "https://api.massive.app";
    export const MASV_TEAM_ID = process.env.MASV_TEAM_ID;
    export const MASV_API_KEY = process.env.MASV_API_KEY;
    export const MASV_ALLOW_DELETE = process.env.MASV_ALLOW_DELETE === "true";
  • The mcpOk helper function used by the tool handler to format successful responses as MCP content.
    export function mcpOk(data: object | string) {
      return {
        content: [
          {
            type: "text" as const,
            text: typeof data === "string" ? data : JSON.stringify(data, null, 2),
          },
        ],
      };
    }
Behavior2/5

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

With no annotations provided, the description bears full responsibility for behavioral transparency. It states the tool returns a list but does not disclose whether it is read-only, requires authentication, has rate limits, or if results are paginated (though page/limit parameters suggest pagination). No side effects or limitations are described.

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 two sentences, both front-loaded. The first sentence states the primary purpose, and the second adds relevant context about portals. No redundant or extraneous 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?

Given 7 optional parameters and no output schema, the description gives reasonable context but lacks explicit mention of pagination behavior or typical response structure. It covers the tool's function and portal concept adequately but could be slightly more informative.

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?

Schema description coverage is 100%, so baseline is 3. The description adds context about what portals are (e.g., 'used to collect files from external users') but does not provide additional meaning to individual parameters beyond what the schema already supplies. Parameter descriptions in schema are clear.

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 verb ('get list') and resource ('portals'). It distinguishes from the sibling 'get_portal' (singular) by indicating this returns a list. Additional context about portals (collect files, subdomain, settings) reinforces the tool's purpose without confusion.

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 implies usage (when you need a list of portals) but provides no explicit guidance on when to use this tool versus alternatives like 'get_portal' (singular) or 'create_portal'. No exclusions or prerequisites are mentioned.

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