Skip to main content
Glama
Qwinty
by Qwinty

get_type_details

Retrieve comprehensive structural details about an object type in Anytype, including its relations, views, and configuration options.

Instructions

Retrieves detailed information about a specific object type in an Anytype space. This tool provides comprehensive details about the type's structure, including its relations, views, and configuration options. Use this tool when you need to understand the structure of a particular object type or to examine its available relations and properties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesSpace ID containing the type
type_idYesType ID to retrieve details for

Implementation Reference

  • src/index.ts:413-438 (registration)
    Registration of the 'get_type_details' tool with MCP server, including input schema (space_id and type_id) and handler function that makes a GET request to the Anytype API endpoint `/spaces/{space_id}/types/{type_id}` and returns the formatted JSON response.
    this.server.tool(
      "get_type_details",
      "Retrieves detailed information about a specific object type in an Anytype space. This tool provides comprehensive details about the type's structure, including its relations, views, and configuration options. Use this tool when you need to understand the structure of a particular object type or to examine its available relations and properties.",
      {
        space_id: z.string().describe("Space ID containing the type"),
        type_id: z.string().describe("Type ID to retrieve details for"),
      },
      async ({ space_id, type_id }) => {
        try {
          const response = await this.makeRequest(
            "get",
            `/spaces/${space_id}/types/${type_id}`
          );
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(response.data, null, 2),
              },
            ],
          };
        } catch (error) {
          return this.handleApiError(error);
        }
      }
    );
  • The handler function executes the core logic: authenticates and calls the Anytype API to retrieve detailed type information, formats the response as text content, and handles errors using the class's error handler.
    async ({ space_id, type_id }) => {
      try {
        const response = await this.makeRequest(
          "get",
          `/spaces/${space_id}/types/${type_id}`
        );
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        return this.handleApiError(error);
      }
    }
  • Zod schema defining the input parameters: space_id (string) and type_id (string).
    {
      space_id: z.string().describe("Space ID containing the type"),
      type_id: z.string().describe("Type ID to retrieve details for"),
    },
Behavior3/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 describes what information is retrieved (type structure, relations, views, configuration options) which is helpful. However, it doesn't mention important behavioral aspects like whether this is a read-only operation (implied but not stated), potential rate limits, authentication requirements, or what happens if the type doesn't exist. The description adds value but leaves gaps in behavioral transparency.

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 efficiently structured in two sentences. The first sentence states the core purpose, and the second provides usage guidance. Every element serves a clear purpose with no redundant information. It's appropriately sized and front-loaded with the main functionality.

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?

For a read operation with 2 parameters and 100% schema coverage but no annotations or output schema, the description provides adequate but not complete context. It explains what information is retrieved but doesn't describe the return format or structure. Given the complexity of retrieving 'comprehensive details' about object types, more information about the output would be helpful, but the description covers the essential purpose and usage.

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 both parameters ('space_id' and 'type_id') clearly documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema. This meets the baseline of 3 when schema coverage is high, but doesn't provide additional semantic context about parameter usage or relationships.

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 tool's purpose with specific verb ('retrieves') and resource ('detailed information about a specific object type in an Anytype space'). It distinguishes from sibling tools like 'get_types' (which likely lists types) by specifying it provides comprehensive details about a particular type's structure including relations, views, and configuration options.

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 explicitly states when to use this tool: 'when you need to understand the structure of a particular object type or to examine its available relations and properties.' This provides clear context, though it doesn't explicitly mention when NOT to use it or name specific alternatives among the sibling tools (like 'get_types' for listing types rather than getting details).

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