Skip to main content
Glama
huiseo

Outline Wiki MCP Server

by huiseo

delete_document

Remove documents from Outline wiki by deleting permanently or moving to trash, based on specified parameters.

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 executes the delete_document tool logic by invoking the Outline API to delete the specified document, optionally permanently.
    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 input schema for the delete_document tool defining documentId (required string) and permanent (optional boolean, defaults to false).
    export const deleteDocumentSchema = z.object({ documentId, permanent: z.boolean().default(false) });
  • Registers the MCP tool definition for delete_document, including name, description, and JSON schema derived from Zod schema.
      'delete_document',
      'Delete a document. If permanent=true, permanently delete; otherwise move to trash.',
      'delete_document'
    ),
  • Combines and registers all handlers, including the document handlers (which contain delete_document) into a single ToolHandlers object.
    export function createAllHandlers(ctx: AppContext): ToolHandlers {
      return {
        ...createSearchHandlers(ctx),
        ...createDocumentHandlers(ctx),
        ...createCollectionHandlers(ctx),
        ...createCommentHandlers(ctx),
        ...createBatchHandlers(ctx),
        ...createSmartHandlers(ctx),
      } as ToolHandlers;
    }
  • Includes 'delete_document' in the DELETE_TOOLS set used for access control checks to enforce delete restrictions.
    'delete_document',
Behavior2/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 explains the trash/permanent deletion behavior, which is valuable. However, it lacks critical information such as required permissions, whether deletion is reversible (especially for permanent=true), what happens to linked resources, or error responses. For a destructive operation, this is a significant gap.

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 perfectly concise with two sentences that front-load the core action and immediately follow with parameter semantics. Every word earns its place, with no redundancy or unnecessary elaboration, making it easy for an agent to parse quickly.

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?

Given the tool's destructive nature, no annotations, and no output schema, the description is incomplete. It covers the basic operation and parameter effect but misses safety warnings, permission requirements, and result format. For a delete tool with 2 parameters, this provides a minimum viable explanation but leaves gaps an agent would need to infer.

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 that false moves to trash while true permanently deletes. This clarifies behavior beyond the schema's boolean type and default value. Since schema description coverage is 0%, the description compensates well for one of the two parameters, though 'documentId' remains minimally described.

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 action ('Delete') and resource ('a document'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'archive_document', 'move_document', and 'restore_document' by specifying deletion behavior. However, it doesn't explicitly contrast with 'batch_delete_documents' for single vs. batch operations.

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 when to use this tool through the 'permanent' parameter explanation (trash vs. permanent deletion), which provides some contextual guidance. However, it doesn't explicitly state when to choose this over alternatives like 'archive_document' or 'batch_delete_documents', nor does it mention prerequisites or error conditions.

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-smart-mcp'

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