Skip to main content
Glama

anytype_create_space

Create a new workspace in Anytype to organize content and collaborate with team members using customizable names, descriptions, and icons.

Instructions

Crea un nuevo espacio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNombre del espacio
descriptionNoDescripción del espacio
iconNoIcono

Implementation Reference

  • The core handler function that implements the tool logic: validates required 'name' field, constructs API request body, performs POST to /v1/spaces, handles response with enhanced success message.
    export async function handleCreateSpace(args: any) {
      const { name, description, icon, ...spaceData } = args;
      
      // Validate required fields
      if (!name) {
        return { 
          content: [{ 
            type: 'text', 
            text: JSON.stringify({
              error: 'Missing required field',
              message: 'Field "name" is required for creating a space',
              required_fields: ['name'],
              provided_fields: Object.keys(args)
            }, null, 2) 
          }] 
        };
      }
      
      // Build request body according to API specification
      const requestBody = {
        name,
        description: description || '', // Optional but recommended
        icon: icon || null, // Optional icon
        ...spaceData
      };
      
      const response = await makeRequest('/v1/spaces', {
        method: 'POST',
        body: JSON.stringify(requestBody),
      });
      
      // Enhance response with verification
      if (response && response.space) {
        const enhancedResponse = {
          success: true,
          message: `Space "${name}" created successfully`,
          space: response.space,
          space_id: response.space.id,
          next_steps: [
            'Use the space_id to create objects, types, and properties in this space',
            'Switch to this space using anytype_get_space if needed'
          ]
        };
        return { content: [{ type: 'text', text: JSON.stringify(enhancedResponse, null, 2) }] };
      }
      
      return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] };
    }
  • Tool definition including name, description, and input schema for validation (requires 'name', optional 'description' and 'icon').
    {
      name: 'anytype_create_space',
      description: 'Crea un nuevo espacio',
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string', description: 'Nombre del espacio' },
          description: { type: 'string', description: 'Descripción del espacio' },
          icon: iconSchema,
        },
        required: ['name'],
      },
    },
  • src/index.ts:112-113 (registration)
    Registers the tool name in the main request handler switch statement, dispatching calls to the handleCreateSpace function.
    case 'anytype_create_space':
      return await handleCreateSpace(args);
  • src/index.ts:96-100 (registration)
    Registers the list of all tools (including anytype_create_space from spaceTools) for the ListToolsRequestHandler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools,
      };
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. 'Crea' implies a write operation, but it doesn't disclose behavioral traits such as permissions required, whether the creation is irreversible, rate limits, or what happens on success/failure. This is a significant gap for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It is front-loaded and appropriately sized for its purpose, making it easy to parse without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a creation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects, usage context, and expected outcomes, which are critical for an agent to invoke this tool correctly in a system with multiple sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for name, description, and icon parameters. The description adds no additional meaning beyond the schema, such as format details or constraints. Baseline 3 is appropriate as the schema adequately documents parameters without extra value from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Crea un nuevo espacio' clearly states the verb ('crea') and resource ('espacio'), making the purpose evident. It distinguishes this as a creation tool among siblings that include update_space, get_space, and list_spaces. However, it doesn't specify what a 'space' is in this context, which slightly limits specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. With siblings like anytype_create_object and anytype_update_space, the description lacks context on prerequisites, appropriate scenarios, or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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