Skip to main content
Glama
getmasv

masv

Official

get_activities

Retrieve a paginated list of activities tracking events on MASV resources such as package uploads, downloads, link generation, and transfers. Filter by activity state, type, portal, package ID, or creation date.

Instructions

Get activities. Activities are records of events that happened with MASV resources like packages, links and transfers. Each activity has assosiated events and can be in one of several states: pending, started, complete, cancelled, error. Full list of activity types: package_upload_to_masv (package upload from user or connected storage integration to MASV), package_download_from_masv (user downloads package), link_generation (new download link is added to the package), package_transfer_masv_to_cloud (package transfer from MASV to connected storage integration)

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)
activity_statesNoRetrieve records that has any of the specified activity states
activity_typesNoRetrieve records that has any of the specified activity types. Activities: package_upload_to_masv - package upload from user or connected storage integration to MASV, package_download_from_masv - user downloading package from MASV, link_generation - adding new download link for the package, package_transfer_masv_to_cloud - package transfer to connected storage integration
portalsNoRetrieve records that belong to any of the specified portal IDs
package_idNoRetrieve records that belongs to the specified package ID
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

Implementation Reference

  • Main handler function for the get_activities tool. Fetches activities from the MASV API, appends activity descriptions from getActivitiesInformation(), and returns the data.
    async function getActivities({ page, ...params }: GetActivitiesParams) {
      const url = new URL(`${MASV_BASE_URL}/v1.1/teams/${MASV_TEAM_ID}/activities`);
    
      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();
    
      const additionalContext = getActivitiesInformation();
      data.activities_description = additionalContext;
    
      return data;
    }
  • Zod schema defining the input parameters for the get_activities tool: page, limit, sort, activity_states, activity_types, portals, package_id, created_at_start, created_at_end, teamspaces.
    const GetActivitiesSchema = 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(),
      activity_states: z
        .array(z.enum(["pending", "started", "complete", "cancelled", "error"]))
        .describe("Retrieve records that has any of the specified activity states")
        .optional(),
      activity_types: z
        .array(
          z.enum([
            "package_upload_to_masv",
            "package_download_from_masv",
            "link_generation",
            "package_transfer_masv_to_cloud",
          ]),
        )
        .describe(
          "Retrieve records that has any of the specified activity types. Activities: package_upload_to_masv - package upload from user or connected storage integration to MASV, package_download_from_masv - user downloading package from MASV, link_generation - adding new download link for the package, package_transfer_masv_to_cloud - package transfer to connected storage integration",
        )
        .optional(),
      portals: z
        .array(z.string())
        .describe("Retrieve records that belong to any of the specified portal IDs")
        .optional(),
      package_id: z
        .string()
        .describe("Retrieve records that belongs to the specified package ID")
        .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(),
    });
  • src/index.ts:192-208 (registration)
    Registration of the get_activities tool with the MCP server, including its description and input schema, delegating to the getActivities handler.
    server.registerTool(
      "get_activities",
      {
        description:
          "Get activities. Activities are records of events that happened with MASV resources like packages, links and transfers. Each activity has assosiated events and can be in one of several states: pending, started, complete, cancelled, error. Full list of activity types: package_upload_to_masv (package upload from user or connected storage integration to MASV), package_download_from_masv (user downloads package), link_generation (new download link is added to the package), package_transfer_masv_to_cloud (package transfer from MASV to connected storage integration)",
        inputSchema: GetActivitiesSchema.shape,
      },
      async (args) => {
        try {
          const data = await getActivities(args);
    
          return mcpOk(data);
        } catch (error) {
          return mcpError(error);
        }
      },
    );
  • Helper function that returns detailed markdown documentation about MASV activities and their states. Called by the getActivities handler to append context to the response.
    function getActivitiesInformation() {
      const info = `
      # MASV Activities
    
    ## General Information
    
    MASV Activities are records of events that happened with MASV resourses like packages, transfers and links.
    
    Activities has states:
    
    - pending
    - started
    - complete
    - cancelled
    - error
    
    Activities could transition between states back and forth multiple times.
    Each activity contains a list of events corresponding to states transitions every time it changes it's state.
    Usually activities start in "pending" state and finish in either "complete", "cancelled" or "error", but there are exceptions.
    
    ## Full list of activities and description of their states
    
    ### package_upload_to_masv
    
    "package_upload_to_masv" activity is created when new package is created. This can be user uploading package via MASV web app, desktop app or MASV Agent or package can be transferred from connected cloud or on-prem storage integration like AWS S3, Azure or MASV Storage Gateway.
    
    - pending - package was created, no files were added yet.
    - started - first file was added to the package. That usually mean that upload started and is in progress now.
    - complete - package successfully finalized and is available at MASV.
    - cancelled - package upload was cancelled. Package was deleted from MASV.
    - error - error happened during package upload. For additional information see error message attached in "extras" field of activity. Package was deleted from MASV.
    
    ### package_download_from_masv
    
    "package_download_from_masv" activity is created when user starts downloading MASV package. Note that if package is sent to connected storage integration another activity "package_transfer_masv_to_cloud" is created.
    
    - pending and started - once user started downloading first file from the package activity switched to "pending" and then immediately to "started" state. "pending" state on its own doesnt have any meaning and is not used for this activity.
    - complete - activity transitioned to "complete" state only if user downloaded all of the files from the package and MASV received confirmation from supported clients. If user only downloaded subset of files activity will stay in "started" state. Supported clients that confirm download are: MASV Desktop app, MASV Agent and MASV download with new "zipless" web download page (legacy web download page will not switch activity to "complete" state because we cant get confirmation of that download).
    - cancelled - this state is never used for this activity.
    - error - error happened during package download. For additional information see error message attached in "extras" field of the activity.
    
    ### link_generation
    
    "link_generation" activity is added when new download link is added to the package.
    
    - pending - new download link was added to the package.
    - started - someone opened download link and possibly started downloading the package.
    - complete - same as for "package_download_from_masv" activity transitioned to "complete" state only if user downloaded all of the files from the package and MASV received confirmation from supported clients. If user only downloaded subset of files activity will stay in "started" state. Supported clients that confirm download are: MASV Desktop app, MASV Agent and MASV download with new "zipless" web download page (legacy web download page will not switch activity to "complete" state because we cant get confirmation of that download).
    - cancelled - not used for "link_generation" activity.
    - error - same as for "package_download_from_masv" error happened during package download. For additional information see error message attached in "extras" field of the activity.
    
    ### package_transfer_masv_to_cloud
    
    "package_transfer_masv_to_cloud" activity is created when package is sent from MASV to connected cloud or on-prem storage integration like AWS S3, Azure or MASV Storage Gateway.
    
    - pending - not used for "package_transfer_masv_to_cloud" activity.
    - started - transfer has started.
    - complete - transfer has completed.
    - cancelled - transfer was cancelled.
    - error - transfer error. For additional information see error message attached in "extras" field of the activity.
      `;
      return info;
    }
Behavior2/5

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

With no annotations, the description must carry behavioral disclosure. It does not state that the tool is read-only, nor does it describe pagination behavior, rate limits, or any side effects. The description focuses on semantics (what is an activity) rather than operational behavior.

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 paragraph that efficiently conveys core concepts (activity definition, states, types). It is front-loaded with the verb and resource. While it could be slightly more concise (e.g., avoiding repetition of type descriptions also in schema), it remains readable and informative.

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?

Without an output schema, the description should explain the return format, but it does not. It fails to mention pagination, field structure, or how to interpret results. For a tool with 10 parameters (all optional), the lack of behavioral context and output explanation makes it incomplete.

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?

Input schema covers 100% of parameters with descriptions. The tool's description adds context by explaining the meaning of activity_types and states (e.g., 'package_upload_to_masv - package upload from user...'), but this largely paraphrases the schema. No new parameter semantics beyond what the schema provides.

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

Purpose4/5

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

The description clearly states the tool retrieves activity records and explains what activities are (events related to MASV resources). It lists activity types and states, providing a clear purpose. However, it does not explicitly distinguish this tool from siblings like get_activities_information or get_activity_events, which may cause confusion.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention when not to use it or suggest other tools for specific sub-tasks, leaving the agent without clear decision-making criteria.

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