Skip to main content
Glama
getmasv

masv

Official

delete_package

Permanently remove a package and its files by ID. Requires MASV_ALLOW_DELETE=true environment variable; action cannot be undone.

Instructions

Delete a package by ID. This permanently removes the package and all its files and cannot be undone. Requires MASV_ALLOW_DELETE=true environment variable to be set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageIdYesId of the package to delete

Implementation Reference

  • The deletePackage function that executes the tool logic. It checks the MASV_ALLOW_DELETE env var, obtains a package token via getPackageToken, and sends a DELETE request to MASV_BASE_URL/v1/packages/{packageId}. Returns success on 204 status or the response data otherwise.
    async function deletePackage({ packageId }: DeletePackageParams) {
      if (!MASV_ALLOW_DELETE) {
        throw new Error("Delete operations are not allowed. Set MASV_ALLOW_DELETE=true in environment variables to enable.");
      }
    
      const packageToken = await getPackageToken(packageId);
    
      const url = new URL(`${MASV_BASE_URL}/v1/packages/${packageId}`);
    
      const headers = {
        "content-type": "application/json",
        "x-package-token": packageToken,
      };
    
      const r = await fetch(url.toString(), { method: "DELETE", headers });
    
      if (r.status === 204) {
        return { success: true, message: "Package deleted successfully" };
      }
    
      const data = await r.json();
      return data;
    }
  • Zod schema for delete_package input: requires a packageId string field.
    const DeletePackageSchema = z.object({
      packageId: z.string().describe("Id of the package to delete"),
    });
  • src/index.ts:174-190 (registration)
    Registration of the 'delete_package' tool with the MCP server, using DeletePackageSchema for input validation and calling deletePackage as the handler.
    server.registerTool(
      "delete_package",
      {
        description:
          "Delete a package by ID. This permanently removes the package and all its files and cannot be undone. Requires MASV_ALLOW_DELETE=true environment variable to be set.",
        inputSchema: DeletePackageSchema.shape,
      },
      async (args) => {
        try {
          const data = await deletePackage(args);
    
          return mcpOk(data);
        } catch (error) {
          return mcpError(error);
        }
      },
    );
  • getPackageToken helper: retrieves the access token for a package by calling getPackage and returning data.access_token.
    async function getPackageToken(packageId: string) {
      const data = await getPackage({ packageId });
      return data.access_token;
    }
Behavior4/5

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

In the absence of annotations, the description adequately discloses the destructive nature, permanence, and environment variable requirement.

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?

Two sentences that are front-loaded and concise, with no wasted words.

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

Completeness5/5

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

For a simple deletion tool with one parameter and no output schema, the description is fully sufficient.

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?

The schema already covers the single parameter with a description; the description adds little beyond confirming it uses an ID.

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 action (delete) and the resource (package by ID), and distinguishes it from sibling tools like get_package or update_package.

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?

It mentions a prerequisite (MASV_ALLOW_DELETE=true) but does not explicitly state when to use or avoid this tool versus alternatives.

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