anytype_delete_object
Archives or deletes an object within a specified space using the object ID. Facilitates streamlined object management in the Anytype MCP Server environment.
Instructions
Elimina (archiva) un objeto
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object_id | Yes | ID del objeto a eliminar | |
| space_id | Yes | ID del espacio |
Implementation Reference
- src/handlers/objects.ts:279-285 (handler)The handler function that implements the core logic of deleting (archiving) an object by making a DELETE request to the Anytype API endpoint `/v1/spaces/{space_id}/objects/{object_id}` and returning the response.export async function handleDeleteObject(args: any) { const { space_id, object_id } = args; const response = await makeRequest(`/v1/spaces/${space_id}/objects/${object_id}`, { method: 'DELETE', }); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; }
- src/tools/objects.ts:80-91 (schema)The input schema definition for the 'anytype_delete_object' tool, specifying the required parameters: space_id and object_id.{ name: 'anytype_delete_object', description: 'Elimina (archiva) un objeto', inputSchema: { type: 'object', properties: { space_id: { type: 'string', description: 'ID del espacio' }, object_id: { type: 'string', description: 'ID del objeto' }, }, required: ['space_id', 'object_id'], }, },
- src/index.ts:132-133 (registration)The switch case in the main CallToolRequest handler that registers and dispatches calls to the 'anytype_delete_object' tool by invoking handleDeleteObject.case 'anytype_delete_object': return await handleDeleteObject(args);
- src/index.ts:85-92 (registration)The tools array registration that includes objectTools (containing the schema for anytype_delete_object) for the ListTools endpoint.const tools = [ ...spaceTools, ...objectTools, ...propertyTools, ...typeTools, ...tagTools, ...templateTools, ...listTools,