Skip to main content
Glama

outline_delete_document

Remove a document from Outline by specifying its ID to manage content and maintain organized collections.

Instructions

Delete a document from Outline

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the document to delete

Implementation Reference

  • The actual implementation of the delete document logic that makes the API request.
    async deleteDocument(id: string): Promise<void> {
      const endpoints = ['/api/documents.delete', '/api/documents/delete', '/api/document/delete'];
    
      for (const endpoint of endpoints) {
        try {
          await this.api.post(endpoint, { id });
          return;
        } catch (error: any) {
          if (error.response?.status === 404 && endpoint !== endpoints[endpoints.length - 1]) {
            console.error(`Endpoint ${endpoint} not found, trying next...`);
            continue;
          }
          throw error;
        }
      }
      throw new Error('No valid endpoint found for deleting document');
    }
  • The tool handler implementation in the MCP server switch block.
    case 'outline_delete_document':
      await this.outlineClient.deleteDocument(args.id as string);
      return {
        content: [
          {
            type: 'text',
            text: `Document ${args.id} deleted successfully`,
          },
        ],
      };
  • The schema definition for the 'outline_delete_document' tool.
      name: 'outline_delete_document',
      description: 'Delete a document from Outline',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'The ID of the document to delete',
          },
        },
        required: ['id'],
      },
    },

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/HelicopterHelicopter/outline-mcp-server'

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