Skip to main content
Glama
huiseo
by huiseo

delete_document

Remove documents from Outline wiki by deleting them permanently or moving to trash. Specify document ID and choose deletion method.

Instructions

Delete a document. If permanent=true, permanently delete; otherwise move to trash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes
permanentNo

Implementation Reference

  • The core handler function that implements the delete_document tool logic. It performs access check and calls the Outline API to delete the document, either permanently or to trash.
    async delete_document(args: DeleteDocumentInput) {
      checkAccess(config, 'delete_document');
      await apiCall(() =>
        apiClient.post('/documents.delete', { id: args.documentId, permanent: args.permanent })
      );
      return {
        success: true,
        documentId: args.documentId,
        permanent: args.permanent,
        message: args.permanent ? MESSAGES.DOCUMENT_DELETED_PERMANENT : MESSAGES.DOCUMENT_DELETED,
      };
    },
  • Zod schema defining the input for delete_document tool: documentId (string) and optional permanent (boolean, default false).
    export const deleteDocumentSchema = z.object({ documentId, permanent: z.boolean().default(false) });
  • Registration of the delete_document tool definition, including name, description, and reference to its input schema.
    createTool(
      'delete_document',
      'Delete a document. If permanent=true, permanently delete; otherwise move to trash.',
      'delete_document'
    ),
  • Inclusion of delete_document schema in the central toolSchemas map used for tool definitions.
    delete_document: deleteDocumentSchema,
  • Composition of document handlers (including delete_document) into the all handlers object.
    ...createDocumentHandlers(ctx),
Behavior2/5

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

With no annotations provided, the description carries full burden. It discloses that deletion can be permanent or move to trash, which is useful behavioral context. However, it doesn't mention permissions required, whether deletion is reversible, rate limits, or what happens to linked data (e.g., comments, backlinks). For a destructive operation with zero annotation coverage, this leaves significant gaps.

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 extremely concise with two sentences that efficiently convey core functionality. The first sentence states the purpose, and the second explains the key parameter's effect. There's no wasted language, and information is front-loaded appropriately.

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 2 parameters, 0% schema coverage, no annotations, and no output schema, the description provides basic operational context but is incomplete. It covers the deletion modes but lacks details on permissions, reversibility, error conditions, or return values. Given the complexity and safety implications, more comprehensive guidance would be beneficial.

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

Parameters4/5

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

The description adds meaningful context for the 'permanent' parameter by explaining its effect (permanently delete vs move to trash), which goes beyond the schema's basic boolean type. However, it doesn't explain the 'documentId' parameter's format or sourcing. With 0% schema description coverage, the description partially compensates but doesn't fully address both parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Delete' and resource 'document', making the purpose unambiguous. It distinguishes from siblings like 'archive_document', 'move_document', and 'restore_document' by specifying deletion behavior. However, it doesn't explicitly contrast with 'batch_delete_documents' or 'list_trash', leaving some sibling differentiation incomplete.

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?

The description implies usage through the conditional 'If permanent=true...' but doesn't explicitly state when to use this tool versus alternatives like 'archive_document' for temporary removal or 'batch_delete_documents' for multiple documents. It provides some context (trash vs permanent deletion) but lacks clear guidance on prerequisites 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/huiseo/outline-wiki-mcp'

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