Skip to main content
Glama
getmasv

masv

Official

delete_portal

Delete a portal permanently by providing its ID. This action cannot be undone; uploaded packages remain accessible. Must have MASV_ALLOW_DELETE=true set.

Instructions

Delete a portal by ID. This permanently removes the portal and cannot be undone. Packages that were uploaded to this portal will remain accessible. Requires MASV_ALLOW_DELETE=true environment variable to be set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portalIdYesId of the portal to delete

Implementation Reference

  • The main handler function for deleting a portal. Checks MASV_ALLOW_DELETE env var, then makes a DELETE request to the MASV API. Returns success on 204 status, otherwise parses error response.
    async function deletePortal({ portalId }: DeletePortalParams) {
        if (!MASV_ALLOW_DELETE) {
            throw new Error("Delete operations are not allowed. Set MASV_ALLOW_DELETE=true in environment variables to enable.");
        }
    
        const url = new URL(`${MASV_BASE_URL}/v1/portals/${portalId}`);
    
        const headers = {
            "content-type": "application/json",
            "x-api-key": MASV_API_KEY,
        };
    
        const r = await fetch(url.toString(), { method: "DELETE", headers });
    
        if (r.status === 204) {
            return { success: true, message: "Portal deleted successfully" };
        }
    
        const data = await r.json();
        return data;
    }
  • Zod schema for the delete_portal tool input, defining a required 'portalId' string parameter.
    const DeletePortalSchema = z.object({
        portalId: z.string().describe("Id of the portal to delete"),
    });
  • src/index.ts:388-404 (registration)
    Registration of the 'delete_portal' tool with the MCP server, including description, input schema (from DeletePortalSchema.shape), and handler that calls deletePortal().
    server.registerTool(
      "delete_portal",
      {
        description:
          "Delete a portal by ID. This permanently removes the portal and cannot be undone. Packages that were uploaded to this portal will remain accessible. Requires MASV_ALLOW_DELETE=true environment variable to be set.",
        inputSchema: DeletePortalSchema.shape,
      },
      async (args) => {
        try {
          const data = await deletePortal(args);
    
          return mcpOk(data);
        } catch (error) {
          return mcpError(error);
        }
      },
    );
  • Import statement for DeletePortalSchema and deletePortal from ./api/portals.js.
    DeletePortalSchema,
    deletePortal,
Behavior5/5

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

Given no annotations, the description fully discloses destructive behavior: permanent removal, irreversibility, and fate of packages (remain accessible). Also mentions the required environment variable.

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?

Three sentences, each with a distinct purpose: action, consequence, requirement. No wasted words, front-loaded with the main purpose.

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 delete tool with one parameter and no output schema, the description covers purpose, side effects, requirements, and irreversibility sufficiently.

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 only parameter (portalId) is already described in the input schema with basic info. The tool description adds no further meaning beyond what the schema provides, so baseline of 3 applies.

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 'Delete a portal by ID', specifying the verb (delete) and resource (portal), and the tool is distinct from siblings like create_portal or update_portal.

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

Usage Guidelines4/5

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

The description explains that deletion is permanent and cannot be undone, indicating when to use it. It also notes a prerequisite (MASV_ALLOW_DELETE=true), but does not compare to alternatives or explicitly state when not to use.

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