Skip to main content
Glama

anytype_update_type

Modify an existing type in Anytype by updating its name, description, icon, layout, or properties to adapt your workspace structure.

Instructions

Actualiza un tipo existente

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesID del espacio
type_idYesID del tipo
nameNoNuevo nombre
descriptionNoNueva descripción
iconNoIcono
layoutNoNuevo layout
propertiesNoNuevos IDs de propiedades

Implementation Reference

  • The main handler function for 'anytype_update_type' tool. It destructures args to get space_id, type_id, and updateData, then makes a PATCH request to the Anytype API endpoint `/v1/spaces/${space_id}/types/${type_id}` and returns the response as formatted text.
    export async function handleUpdateType(args: any) { const { space_id, type_id, ...updateData } = args; const response = await makeRequest(`/v1/spaces/${space_id}/types/${type_id}`, { method: 'PATCH', body: JSON.stringify(updateData), }); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; }
  • The tool schema definition including name, description, and inputSchema for validating arguments to the 'anytype_update_type' tool.
    { name: 'anytype_update_type', description: 'Actualiza un tipo existente', inputSchema: { type: 'object', properties: { space_id: { type: 'string', description: 'ID del espacio' }, type_id: { type: 'string', description: 'ID del tipo' }, name: { type: 'string', description: 'Nuevo nombre' }, description: { type: 'string', description: 'Nueva descripción' }, icon: iconSchema, layout: { type: 'string', description: 'Nuevo layout' }, properties: { type: 'array', items: { type: 'string' }, description: 'Nuevos IDs de propiedades' }, }, required: ['space_id', 'type_id'], }, },
  • src/index.ts:154-155 (registration)
    The switch case in the CallToolRequestHandler that registers and dispatches calls to the handleUpdateType handler for the 'anytype_update_type' tool.
    case 'anytype_update_type': return await handleUpdateType(args);
  • src/index.ts:85-93 (registration)
    The tools array construction that includes typeTools (containing the schema for anytype_update_type) for the ListToolsRequestHandler.
    const tools = [ ...spaceTools, ...objectTools, ...propertyTools, ...typeTools, ...tagTools, ...templateTools, ...listTools, ];
  • src/index.ts:58-58 (registration)
    Import of the handleUpdateType function from handlers/types-tags.js, necessary for registration in the switch dispatcher.
    handleUpdateType,

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

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