remove_object_from_list
Remove an object from a specific list in an Anytype space by specifying space, list, and object IDs.
Instructions
Removes an object from a specific list in a space.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | Space ID containing the list | |
| list_id | Yes | List ID to remove object from | |
| object_id | Yes | Object ID to remove |
Implementation Reference
- src/index.ts:622-639 (handler)The handler function executes a DELETE request to the Anytype API endpoint to remove the specified object from the list.
async ({ space_id, list_id, object_id }) => { try { const response = await this.makeRequest( "delete", `/spaces/${space_id}/lists/${list_id}/objects/${object_id}` ); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } } - src/index.ts:617-621 (schema)Zod schema defining the input parameters: space_id, list_id, and object_id.
{ space_id: z.string().describe("Space ID containing the list"), list_id: z.string().describe("List ID to remove object from"), object_id: z.string().describe("Object ID to remove"), }, - src/index.ts:614-640 (registration)Registration of the 'remove_object_from_list' tool using McpServer.tool(), including description, schema, and inline handler.
this.server.tool( "remove_object_from_list", "Removes an object from a specific list in a space.", { space_id: z.string().describe("Space ID containing the list"), list_id: z.string().describe("List ID to remove object from"), object_id: z.string().describe("Object ID to remove"), }, async ({ space_id, list_id, object_id }) => { try { const response = await this.makeRequest( "delete", `/spaces/${space_id}/lists/${list_id}/objects/${object_id}` ); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } } );