Skip to main content
Glama

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"), },

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