Skip to main content
Glama
Qwinty
by Qwinty

get_template_details

Retrieve detailed information about a specific template's structure, content, and configuration in an Anytype space to examine properties before creating new objects.

Instructions

Retrieves detailed information about a specific template in an Anytype space. This tool provides comprehensive details about the template's structure, content, and configuration. Use this tool when you need to examine a template's properties before using it to create new objects, or to understand how a particular template is structured.

Input Schema

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

Implementation Reference

  • The asynchronous handler function that executes the core logic of the 'get_template_details' tool. It constructs the Anytype API endpoint using the provided space_id, type_id, and template_id, performs a GET request via makeRequest, and returns the JSON-formatted response data or propagates errors through handleApiError.
    async ({ space_id, type_id, template_id }) => {
      try {
        const response = await this.makeRequest(
          "get",
          `/spaces/${space_id}/types/${type_id}/templates/${template_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 for the 'get_template_details' tool, validating space_id, type_id, and template_id as required strings with descriptive metadata.
    {
      space_id: z.string().describe("Space ID containing the template"),
      type_id: z.string().describe("Type ID for the template"),
      template_id: z.string().describe("Template ID to retrieve details for"),
    },
  • src/index.ts:481-506 (registration)
    The complete registration of the 'get_template_details' tool on the MCP server using McpServer.tool(), specifying the tool name, description, input schema, and handler function.
      "get_template_details",
      "Retrieves detailed information about a specific template in an Anytype space. This tool provides comprehensive details about the template's structure, content, and configuration. Use this tool when you need to examine a template's properties before using it to create new objects, or to understand how a particular template is structured.",
      {
        space_id: z.string().describe("Space ID containing the template"),
        type_id: z.string().describe("Type ID for the template"),
        template_id: z.string().describe("Template ID to retrieve details for"),
      },
      async ({ space_id, type_id, template_id }) => {
        try {
          const response = await this.makeRequest(
            "get",
            `/spaces/${space_id}/types/${type_id}/templates/${template_id}`
          );
          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?

No annotations are provided, so the description carries the full burden. It describes the tool as retrieving comprehensive details, which implies a read-only operation, but does not explicitly state behavioral traits like whether it requires specific permissions, rate limits, or error conditions. It adds some context about the type of information returned (structure, content, configuration), but lacks full behavioral disclosure for a tool with no annotations.

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 two sentences: the first states the purpose, and the second provides usage guidelines. It is front-loaded with the core function and avoids unnecessary details, though it could be slightly more concise by combining ideas without losing clarity.

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 complexity (a read operation with 3 required parameters), no annotations, and no output schema, the description does a good job by explaining the purpose and usage. However, it lacks details on the return format or error handling, which would be helpful for completeness. It compensates somewhat with clear usage context but falls short of being fully comprehensive.

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%, so the schema already documents all three parameters (space_id, type_id, template_id) with descriptions. The description does not add any parameter-specific details beyond what the schema provides, such as format examples or interdependencies. Baseline 3 is appropriate when the schema handles parameter documentation effectively.

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 'detailed information about a specific template in an Anytype space'. It distinguishes from sibling tools like 'get_templates' (which likely lists templates) by specifying retrieval of comprehensive details for a specific template, 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 examine a template's properties before using it to create new objects, or to understand how a particular template is structured'. This provides clear context for usage, including a specific alternative scenario (using it to create objects) and distinguishes it from general listing tools.

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