anytype_update_space
Modify an existing Anytype workspace by updating its name, description, or icon to reflect changes in your organizational structure.
Instructions
Actualiza un espacio existente
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"space_id": "<space_id>"
},
"name": "anytype_update_space"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | ID del espacio | |
| name | No | Nuevo nombre del espacio | |
| description | No | Nueva descripción del espacio | |
| icon | No | Icono |
Implementation Reference
- src/handlers/spaces.ts:88-95 (handler)The main handler function that implements the tool logic: extracts space_id and update data, makes a PATCH request to the Anytype API endpoint `/v1/spaces/${space_id}`, and returns the formatted response.
export async function handleUpdateSpace(args: any) { const { space_id, ...updateData } = args; const response = await makeRequest(`/v1/spaces/${space_id}`, { method: 'PATCH', body: JSON.stringify(updateData), }); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; } - src/tools/spaces.ts:37-50 (schema)Defines the tool metadata including name, description, and input schema specifying required space_id and optional fields like name, description, icon.
{ name: 'anytype_update_space', description: 'Actualiza un espacio existente', inputSchema: { type: 'object', properties: { space_id: { type: 'string', description: 'ID del espacio' }, name: { type: 'string', description: 'Nuevo nombre del espacio' }, description: { type: 'string', description: 'Nueva descripción del espacio' }, icon: iconSchema, }, required: ['space_id'], }, }, - src/index.ts:114-115 (registration)In the main switch statement, routes calls to 'anytype_update_space' to the handleUpdateSpace handler function.
case 'anytype_update_space': return await handleUpdateSpace(args);