Skip to main content
Glama
getmasv

masv

Official

get_package_files

Retrieve the list of files in a package by providing its package ID.

Instructions

Get list of package files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageIdYesId of the package to retrieve files for

Implementation Reference

  • The actual implementation of get_package_files. It takes a packageId, retrieves a package token via getPackageToken, then fetches the list of files from the MASV API endpoint /v1/packages/{packageId}/files.
    async function getPackageFiles({ packageId }: GetPackageFilesParams) {
      const packageToken = await getPackageToken(packageId);
    
      const url = new URL(`${MASV_BASE_URL}/v1/packages/${packageId}/files`);
    
      const headers = {
        "content-type": "application/json",
        "x-package-token": packageToken,
      };
    
      const r = await fetch(url.toString(), { headers });
      const data = await r.json();
    
      return data;
    }
  • Defines the Zod input schema for get_package_files, accepting a packageId string parameter.
    const GetPackageFilesSchema = z.object({
      packageId: z.string().describe("Id of the package to retrieve files for"),
    });
  • src/index.ts:121-136 (registration)
    Registers the 'get_package_files' tool with the MCP server, linking it to GetPackageFilesSchema for input validation and calling the getPackageFiles handler.
    server.registerTool(
      "get_package_files",
      {
        description: "Get list of package files",
        inputSchema: GetPackageFilesSchema.shape,
      },
      async (args) => {
        try {
          const data = await getPackageFiles(args);
    
          return mcpOk(data);
        } catch (error) {
          return mcpError(error);
        }
      },
    );
  • Helper function used by getPackageFiles that fetches the package details to obtain its access_token for authenticated API requests.
    async function getPackageToken(packageId: string) {
      const data = await getPackage({ packageId });
      return data.access_token;
    }
  • Exports GetPackageFilesSchema and getPackageFiles from the packages module so they can be imported in src/index.ts for tool registration.
    export {
      GetPackagesSchema,
      getPackages,
      GetPackageSchema,
      getPackage,
      GetPortalPackagesSchema,
      getPortalPackages,
      GetPackageFilesSchema,
      getPackageFiles,
Behavior2/5

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

No annotations are provided, so the description bears full responsibility. It does not disclose behavioral traits such as whether the list is complete or paginated, nor any side effects or permissions needed. This is a significant gap for a data retrieval tool.

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 concise sentence with no wasted words. However, it lacks structure and could be expanded slightly without losing conciseness.

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?

Given only one parameter, no output schema, and no annotations, the description is minimal. It does not explain the return format, pagination, error conditions, or usage context, making it incomplete for an agent to use confidently.

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% (one parameter with a clear description). The tool description adds no additional meaning beyond what's in the schema, meeting the baseline for high coverage.

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 'Get list of package files' clearly states the action (Get list) and resource (package files). It distinguishes from sibling tools like 'get_package' (gets package details) and 'list_files_on_integration' (lists files on integration).

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?

No explicit guidance on when to use this tool versus alternatives. The description implies usage for retrieving files of a package, but does not provide context or exclusions.

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