Skip to main content
Glama
moliver28

anythingllm-mcp

by moliver28

delete_workspace

Delete an AnythingLLM workspace by providing its slug to remove it from the platform permanently.

Instructions

Delete a workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes

Implementation Reference

  • src/index.ts:73-73 (registration)
    The tool 'delete_workspace' is registered here as 'workspace_delete' under the description 'Delete workspace'. Note: the tool name is 'workspace_delete', not literally 'delete_workspace'.
    { name: "workspace_delete", description: "Delete workspace", inputSchema: { type: "object", properties: { slug: { type: "string" } }, required: ["slug"] } },
  • Handler for the 'workspace_delete' tool. It sends a DELETE request to '/workspace/{slug}' using the apiRequest helper.
    else if (name === "workspace_delete") { result = await apiRequest("/workspace/" + args?.slug, "DELETE"); }
  • Input schema for 'workspace_delete' (delete_workspace): expects a 'slug' string property which is required.
    { name: "workspace_delete", description: "Delete workspace", inputSchema: { type: "object", properties: { slug: { type: "string" } }, required: ["slug"] } },
  • The apiRequest function is the helper utility used to make HTTP requests to the AnythingLLM API. It handles the DELETE request for workspace deletion.
    function apiRequest(path: string, method = "GET", body?: any, extraHeaders = {}): Promise<any> {
      return new Promise((resolve, reject) => {
        const baseUrl = new URL(ANYTHING_LLM_BASE);
        const fullUrl = new URL(path, baseUrl);
        const options: any = {
          hostname: fullUrl.hostname,
          port: fullUrl.port || (fullUrl.protocol === "https:" ? 443 : 80),
          path: fullUrl.pathname + fullUrl.search,
          method,
          headers: Object.assign({
            "Authorization": "Bearer " + ANYTHING_LLM_API_KEY,
            "Content-Type": "application/json",
            "Accept": "application/json",
          }, extraHeaders),
        };
    
        const lib = fullUrl.protocol === "https:" ? https : http;
        const req = lib.request(options, (res: any) => {
          let data = "";
          res.on("data", (chunk: string) => { data += chunk; });
          res.on("end", () => {
            try {
              resolve(data ? JSON.parse(data) : {});
            } catch {
              resolve({ raw: data });
            }
          });
        });
        req.on("error", reject);
        if (body) req.write(JSON.stringify(body));
        req.end();
      });
    }
Behavior2/5

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

Delete operations are destructive, but the description does not disclose that deletion is irreversible or what happens to associated data. With no annotations, the description should provide this context but fails to.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is too short (only 4 words) and lacks essential detail. It sacrifices completeness for conciseness, making it insufficient for accurate tool invocation.

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 no output schema and no annotations, the description is incomplete. It does not describe return values, error conditions, or required permissions, leaving critical gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description does not explain the 'slug' parameter, leaving the agent to infer its meaning. Additional context like value format or examples would help.

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?

Description clearly states the verb and resource: 'Delete a workspace'. It effectively distinguishes from sibling tools like create_workspace, update_workspace, and get_workspace.

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?

No guidance is provided on when to use this tool versus alternatives, such as archiving or disabling. Also missing prerequisites or consequences (e.g., irreversible action).

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/moliver28/anythingllm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server