Skip to main content
Glama
tim-mcdonnell

Tana MCP Server

create_supertag

Create structured tags in Tana workspaces to organize and categorize information effectively using the Tana MCP Server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNodeIdNoSCHEMA
nameYes
descriptionNo

Implementation Reference

  • Handler function that creates a plain Tana node under the target (default 'SCHEMA') with the supertag SYS_T01, effectively creating a new supertag.
    async ({ targetNodeId, name, description }) => {
      try {
        const node: TanaPlainNode = {
          name,
          description,
          supertags: [{ id: 'SYS_T01' }]
        };
    
        const result = await this.tanaClient.createNode(targetNodeId, node);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ],
          isError: false
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error creating supertag: ${error instanceof Error ? error.message : String(error)}`
            }
          ],
          isError: true
        };
      }
  • Zod input schema defining parameters for the create_supertag tool.
    {
      targetNodeId: z.string().optional().default('SCHEMA'),
      name: z.string(),
      description: z.string().optional()
  • Registration of the create_supertag tool on the MCP server using this.server.tool.
    this.server.tool(
      'create_supertag',
      {
        targetNodeId: z.string().optional().default('SCHEMA'),
        name: z.string(),
        description: z.string().optional()
      },
      async ({ targetNodeId, name, description }) => {
        try {
          const node: TanaPlainNode = {
            name,
            description,
            supertags: [{ id: 'SYS_T01' }]
          };
    
          const result = await this.tanaClient.createNode(targetNodeId, node);
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(result, null, 2)
              }
            ],
            isError: false
          };
        } catch (error) {
          return {
            content: [
              {
                type: 'text',
                text: `Error creating supertag: ${error instanceof Error ? error.message : String(error)}`
              }
            ],
            isError: true
          };
        }
      }

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/tim-mcdonnell/tana-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server