Skip to main content
Glama

delete_user

Remove a user account from BookStack wiki while optionally transferring content ownership to another user. Requires administrator permissions to execute.

Instructions

Delete a user account (requires admin permissions)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUser ID
migrate_ownership_idNoID of user to transfer ownership of content to

Implementation Reference

  • Input schema for the 'delete_user' tool defining parameters: id (required number) and optional migrate_ownership_id (number).
    {
      name: "delete_user",
      description: "Delete a user account (requires admin permissions)",
      inputSchema: {
        type: "object",
        properties: {
          id: { type: "number", description: "User ID" },
          migrate_ownership_id: {
            type: "number",
            description: "ID of user to transfer ownership of content to",
          },
        },
        required: ["id"],
      },
    },
  • Handler logic in handleSearchAndUserTool function that parses arguments, calls client.deleteUser, and returns success message.
    case "delete_user": {
      const { id, migrate_ownership_id } = args;
      const userId = parseInteger(id);
      const migrateId = migrate_ownership_id
        ? parseInteger(migrate_ownership_id)
        : undefined;
    
      await client.deleteUser(userId, migrateId);
      return `User ${userId} deleted successfully`;
    }
  • src/index.ts:55-59 (registration)
    Registration of tools by including createSearchAndUserTools (which defines delete_user) in the allTools array returned by ListToolsRequestSchema handler.
    // Combine all tools
    const allTools: Tool[] = [
      ...createContentTools(bookStackClient),
      ...createSearchAndUserTools(bookStackClient),
    ];
  • src/index.ts:126-128 (registration)
    Dispatch logic in CallToolRequestSchema handler routes 'delete_user' (listed in searchUserToolNames) to handleSearchAndUserTool.
    } else if (searchUserToolNames.includes(name)) {
      result = await handleSearchAndUserTool(name, args, bookStackClient);
    } else {
  • BookStackClient helper method that performs the actual API DELETE request to delete a user, optionally migrating ownership.
    async deleteUser(id: number, migrateOwnershipId?: number): Promise<void> {
      const data = migrateOwnershipId
        ? { migrate_ownership_id: migrateOwnershipId }
        : undefined;
      await this.api.delete(`/users/${id}`, { data });
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the admin permission requirement, which is valuable context. However, it doesn't describe whether this deletion is permanent/reversible, what happens to user data, error conditions, or confirmation requirements - significant gaps for a destructive operation.

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?

The description is a single, efficient sentence that front-loads the core action ('Delete a user account') and follows with the critical constraint ('requires admin permissions'). Every word serves a purpose with zero wasted content.

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

Completeness3/5

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

For a destructive tool with no annotations and no output schema, the description provides basic purpose and permission context but lacks critical information about behavioral consequences, return values, error handling, and comparison to sibling deletion tools. It's minimally adequate but has clear gaps.

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%, so the schema already fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema. The baseline score of 3 reflects adequate but minimal value addition for parameters.

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 specific action ('Delete') and resource ('a user account'), distinguishing it from sibling tools like 'delete_book' or 'delete_page' which target different resources. It provides precise verb+resource pairing that leaves no ambiguity about what this tool does.

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 explicitly states 'requires admin permissions', providing clear context about when this tool can be used. However, it doesn't mention when NOT to use it (e.g., for soft deletion vs permanent deletion) or name specific alternatives among the many sibling deletion tools.

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/lautarobarba/bookstack_mcp_server'

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