Skip to main content
Glama
Qwinty
by Qwinty

get_types

Retrieve available object types in an Anytype space to understand what can be created or find correct type IDs for new objects.

Instructions

Retrieves all object types available in a specified Anytype space. This tool provides information about the different types of objects that can be created in the space, including their IDs, names, and metadata. Results are paginated for spaces with many types. Use this tool when you need to understand what types of objects can be created or to find the correct type ID for creating new objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesSpace ID to get types from
offsetNoPagination offset
limitNoNumber of results per page (1-100)

Implementation Reference

  • src/index.ts:375-410 (registration)
    Registration of the 'get_types' MCP tool, including input schema (space_id, offset, limit) and inline async handler. The handler validates limit, makes a GET request to Anytype API `/spaces/${space_id}/types` with pagination params, and returns JSON-stringified response data as text content. Errors are handled via handleApiError.
    this.server.tool(
      "get_types",
      "Retrieves all object types available in a specified Anytype space. This tool provides information about the different types of objects that can be created in the space, including their IDs, names, and metadata. Results are paginated for spaces with many types. Use this tool when you need to understand what types of objects can be created or to find the correct type ID for creating new objects.",
      {
        space_id: z.string().describe("Space ID to get types from"),
        offset: z.number().optional().default(0).describe("Pagination offset"),
        limit: z
          .number()
          .optional()
          .default(100)
          .describe("Number of results per page (1-100)"),
      },
      async ({ space_id, offset, limit }) => {
        try {
          // Validate limit
          const validLimit = Math.max(1, Math.min(1000, limit));
    
          const response = await this.makeRequest(
            "get",
            `/spaces/${space_id}/types`,
            null,
            { offset, limit: validLimit }
          );
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(response.data, null, 2),
              },
            ],
          };
        } catch (error) {
          return this.handleApiError(error);
        }
      }
    );
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it's a read operation ('Retrieves'), mentions pagination ('Results are paginated'), and specifies the scope ('available in a specified Anytype space'). However, it doesn't cover potential rate limits, error conditions, or authentication needs, leaving some behavioral aspects unspecified.

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 appropriately sized with three sentences, each adding value: the first states the purpose, the second elaborates on the information provided, and the third gives usage guidelines. It's front-loaded with the core functionality and avoids redundancy, making it efficient and well-structured.

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

Completeness4/5

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

Given the tool's moderate complexity (a read operation with pagination), no annotations, and no output schema, the description does a good job of covering purpose, usage, and key behaviors. However, it lacks details on return values (e.g., what metadata is included) and error handling, which would be helpful since there's no output schema. It's mostly complete but has minor gaps.

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%, providing full documentation for all parameters (space_id, offset, limit). The description adds no additional parameter semantics beyond what's in the schema, such as format details or usage examples. According to the rules, with high schema coverage (>80%), the baseline score is 3 when no param info is added in the description.

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

Purpose5/5

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

The description clearly states the verb ('Retrieves') and resource ('all object types available in a specified Anytype space'), specifying what the tool does. It distinguishes from siblings like get_type_details (which gets details for a specific type) and get_objects (which retrieves objects rather than types), making the purpose specific and differentiated.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'when you need to understand what types of objects can be created or to find the correct type ID for creating new objects.' This provides clear context for usage, distinguishing it from alternatives like get_type_details for specific type details or create_object for creating objects, offering explicit guidance on appropriate scenarios.

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