Skip to main content
Glama
Qwinty
by Qwinty

create_object

Create new content objects like pages, notes, or tasks in Anytype spaces. Specify name, type, description, icon, and content to organize information effectively.

Instructions

Creates a new object within a specified Anytype space. This tool allows you to add various types of content (pages, notes, tasks, etc.) to your spaces. You can specify the object's name, type, description, icon, and content. Optionally, you can use a template to create pre-structured objects. Use this tool when you need to add new content to an existing space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesSpace ID to create the object in
nameYesObject name
type_keyYesType key of object to create (e.g. 'ot-page')
descriptionNoObject's short description
iconNoObject icon details (structure based on API docs)
bodyNoObject body/content (Markdown supported)
template_idNoTemplate ID to use
sourceNoSource URL (for bookmarks)

Implementation Reference

  • The asynchronous handler function that executes the create_object tool. It constructs the object payload from input parameters and makes a POST request to the Anytype API endpoint `/spaces/${space_id}/objects` to create the new object.
      space_id,
      name,
      type_key,
      description,
      icon,
      body,
      template_id,
      source,
    }) => {
      try {
        const createObj: any = {
          name,
          type_key,
        };
    
        if (description) createObj.description = description;
        if (icon) createObj.icon = icon;
        if (body) createObj.body = body;
        if (template_id) createObj.template_id = template_id;
        if (source) createObj.source = source;
    
        const response = await this.makeRequest(
          "post",
          `/spaces/${space_id}/objects`,
          createObj
        );
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        return this.handleApiError(error);
      }
    }
  • Zod input schema defining parameters for create_object: required space_id, name, type_key; optional description, icon (with sub-schema), body, template_id, source.
    {
      space_id: z.string().describe("Space ID to create the object in"),
      name: z.string().describe("Object name"),
      type_key: z
        .string()
        .describe("Type key of object to create (e.g. 'ot-page')"),
      description: z
        .string()
        .optional()
        .describe("Object's short description"),
      icon: z
        .object({
          format: z
            .enum(["emoji", "file", "icon"])
            .describe("Icon format (required if icon is provided)"),
          emoji: z
            .string()
            .optional()
            .describe("Emoji character (if format is 'emoji')"),
          file: z
            .string()
            .url()
            .optional()
            .describe("URL to the icon file (if format is 'file')"),
          name: z
            .string()
            .optional()
            .describe("Name of the built-in icon (if format is 'icon')"),
          color: z
            .string()
            .optional()
            .describe("Color of the icon (optional)"),
        })
        .optional()
        .describe("Object icon details (structure based on API docs)"),
      body: z
        .string()
        .optional()
        .describe("Object body/content (Markdown supported)"),
      template_id: z.string().optional().describe("Template ID to use"),
      source: z.string().optional().describe("Source URL (for bookmarks)"),
    },
    async ({
  • src/index.ts:191-275 (registration)
    Registration of the create_object tool on the MCP server using this.server.tool(), providing name, description, input schema, and handler function.
    this.server.tool(
      "create_object",
      "Creates a new object within a specified Anytype space. This tool allows you to add various types of content (pages, notes, tasks, etc.) to your spaces. You can specify the object's name, type, description, icon, and content. Optionally, you can use a template to create pre-structured objects. Use this tool when you need to add new content to an existing space.",
      {
        space_id: z.string().describe("Space ID to create the object in"),
        name: z.string().describe("Object name"),
        type_key: z
          .string()
          .describe("Type key of object to create (e.g. 'ot-page')"),
        description: z
          .string()
          .optional()
          .describe("Object's short description"),
        icon: z
          .object({
            format: z
              .enum(["emoji", "file", "icon"])
              .describe("Icon format (required if icon is provided)"),
            emoji: z
              .string()
              .optional()
              .describe("Emoji character (if format is 'emoji')"),
            file: z
              .string()
              .url()
              .optional()
              .describe("URL to the icon file (if format is 'file')"),
            name: z
              .string()
              .optional()
              .describe("Name of the built-in icon (if format is 'icon')"),
            color: z
              .string()
              .optional()
              .describe("Color of the icon (optional)"),
          })
          .optional()
          .describe("Object icon details (structure based on API docs)"),
        body: z
          .string()
          .optional()
          .describe("Object body/content (Markdown supported)"),
        template_id: z.string().optional().describe("Template ID to use"),
        source: z.string().optional().describe("Source URL (for bookmarks)"),
      },
      async ({
        space_id,
        name,
        type_key,
        description,
        icon,
        body,
        template_id,
        source,
      }) => {
        try {
          const createObj: any = {
            name,
            type_key,
          };
    
          if (description) createObj.description = description;
          if (icon) createObj.icon = icon;
          if (body) createObj.body = body;
          if (template_id) createObj.template_id = template_id;
          if (source) createObj.source = source;
    
          const response = await this.makeRequest(
            "post",
            `/spaces/${space_id}/objects`,
            createObj
          );
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(response.data, null, 2),
              },
            ],
          };
        } catch (error) {
          return this.handleApiError(error);
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description carries full burden. It correctly identifies this as a creation/mutation operation ('Creates a new object') and mentions it works 'within a specified Anytype space.' However, it lacks important behavioral details like required permissions, whether the operation is idempotent, error conditions, or what happens on success. The mention of templates adds some context but doesn't fully compensate for the annotation gap.

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

Conciseness4/5

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

The description is appropriately sized with three sentences. It's front-loaded with the core purpose, followed by parameter context, and ends with usage guidance. There's minimal redundancy, though the second sentence could be slightly more concise by combining the parameter listing.

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

Completeness3/5

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

Given this is a mutation tool with 8 parameters, no annotations, and no output schema, the description provides adequate but incomplete context. It covers the basic purpose, some parameters, and usage context, but lacks details about behavioral traits, error handling, and return values that would be important for a creation operation. The high schema coverage helps but doesn't fully compensate for the missing behavioral transparency.

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?

The schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description mentions some parameters ('name, type, description, icon, and content') and adds context about templates, but doesn't provide significant additional semantic meaning beyond what's in the schema. This meets the baseline expectation when schema coverage is high.

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 clearly states the tool's purpose: 'Creates a new object within a specified Anytype space' with specific resources (pages, notes, tasks) and context (within a space). It distinguishes from siblings like 'create_space' by focusing on objects rather than spaces, but doesn't explicitly differentiate from 'add_objects_to_list' which might have overlapping functionality.

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

Usage Guidelines4/5

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

The description provides clear context for usage: 'Use this tool when you need to add new content to an existing space.' This gives a positive when-to-use guideline. However, it doesn't explicitly mention when NOT to use it or name alternatives like 'add_objects_to_list' for list-specific operations or 'create_space' for space creation.

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

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