Skip to main content
Glama
Qwinty
by Qwinty

delete_object

Permanently removes an object and all its content from an Anytype space. Verify object ID before deletion as this action is irreversible.

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 asynchronous handler function that executes the DELETE API request to permanently remove the specified object from the Anytype space.
    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 defining the required parameters: space_id and object_id.
    {
      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 registration of the 'delete_object' tool using this.server.tool(), including name, description, schema, and inline handler.
    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);
        }
      }
    );
Behavior4/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 effectively describes key traits: the operation is permanent and irreversible ('deleted objects cannot be recovered'), destructive ('deletes the object and all its content'), and requires caution. It does not cover aspects like error handling, permissions, or rate limits, but provides sufficient critical information for a mutation tool.

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 front-loaded with the core purpose, followed by critical warnings and a verification step. Each sentence adds value: the first defines the action, the second emphasizes permanence, the third advises caution, and the fourth specifies a prerequisite. There is no wasted text, making it highly efficient.

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

Completeness4/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 is largely complete. It covers the purpose, behavioral risks, and usage caution. It could improve by mentioning error cases (e.g., invalid IDs) or response format, but given the schema's full parameter coverage and the clear warning context, it provides sufficient guidance for safe use.

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 documents both parameters ('space_id' and 'object_id'). The description adds no additional parameter-specific details beyond what the schema provides, such as format examples or constraints. The baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

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 tool's purpose with specific verbs ('permanently removes', 'deletes') and identifies the resource ('object from a specified Anytype space'). It distinguishes this destructive operation from sibling tools like 'remove_object_from_list' (which likely only removes from a list) and 'create_object'.

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 provides clear context for usage with warnings ('use with caution', 'verify before deletion') and implies this is for permanent removal versus alternatives like 'remove_object_from_list'. However, it does not explicitly name when to use this tool versus other deletion-related siblings or specify prerequisites beyond verification.

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

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