Skip to main content
Glama

delete_object

Permanently remove an object and all its content from an Anytype space. Verify the object ID before deletion as this action cannot be undone.

Instructions

Permanently removes an object from a specified Anytype space. This tool deletes the object and all its content. Use this tool with caution as deleted objects cannot be recovered. Always verify the object ID before deletion to avoid removing important content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesSpace ID containing the object
object_idYesObject ID to delete

Implementation Reference

  • The async handler function that executes the delete_object tool by making a DELETE API request to the Anytype endpoint `/spaces/{space_id}/objects/{object_id}` and returning the response or handling errors.
    async ({ space_id, object_id }) => { try { const response = await this.makeRequest( "delete", `/spaces/${space_id}/objects/${object_id}` ); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } }
  • Zod input schema validating the required parameters space_id and object_id for the delete_object tool.
    { space_id: z.string().describe("Space ID containing the object"), object_id: z.string().describe("Object ID to delete"), },
  • src/index.ts:278-303 (registration)
    The MCP server.tool() call that registers the delete_object tool with its name, description, input schema, and handler function.
    this.server.tool( "delete_object", "Permanently removes an object from a specified Anytype space. This tool deletes the object and all its content. Use this tool with caution as deleted objects cannot be recovered. Always verify the object ID before deletion to avoid removing important content.", { space_id: z.string().describe("Space ID containing the object"), object_id: z.string().describe("Object ID to delete"), }, async ({ space_id, object_id }) => { try { const response = await this.makeRequest( "delete", `/spaces/${space_id}/objects/${object_id}` ); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } } );

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/Qwinty/anytype-mcp'

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