get_type_details
Retrieve detailed information about object types in Anytype spaces, including structure, relations, views, and configuration options to understand type organization and properties.
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
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | Space ID containing the type | |
| type_id | Yes | Type ID to retrieve details for |
Implementation Reference
- src/index.ts:420-437 (handler)The handler function for the 'get_type_details' tool. It makes a GET request to the Anytype API endpoint `/spaces/{space_id}/types/{type_id}` to retrieve detailed information about the specified type and returns the response data as a formatted JSON text content.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); } }
- src/index.ts:416-419 (schema)Input schema for the 'get_type_details' tool using Zod validation. Requires space_id and type_id as strings.{ space_id: z.string().describe("Space ID containing the type"), type_id: z.string().describe("Type ID to retrieve details for"), },
- src/index.ts:413-438 (registration)Registration of the 'get_type_details' tool on the MCP server using this.server.tool, including name, description, input schema, and inline handler function.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); } } );