create_space
Set up a new workspace in Anytype to organize content and collaborate with others. Create a fresh organizational container for your objects and data.
Instructions
Creates a new Anytype space with the specified name. This tool allows you to set up a fresh workspace for organizing objects and collaborating with others. Use this tool when you need to establish a new organizational container for your Anytype content.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the new space |
Implementation Reference
- src/index.ts:173-187 (handler)The handler function for the 'create_space' tool that makes a POST request to the Anytype API /spaces endpoint with the space name and returns the JSON response or handles errors.async ({ name }) => { try { const response = await this.makeRequest("post", "/spaces", { name }); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } }
- src/index.ts:170-172 (schema)Zod input schema defining the required 'name' parameter as a string for the create_space tool.{ name: z.string().describe("Name for the new space"), },
- src/index.ts:167-188 (registration)Registration of the 'create_space' MCP tool using McpServer.tool() method, including name, description, input schema, and inline handler function.this.server.tool( "create_space", "Creates a new Anytype space with the specified name. This tool allows you to set up a fresh workspace for organizing objects and collaborating with others. Use this tool when you need to establish a new organizational container for your Anytype content.", { name: z.string().describe("Name for the new space"), }, async ({ name }) => { try { const response = await this.makeRequest("post", "/spaces", { name }); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } } );