Skip to main content
Glama

create_field

Add custom fields to Tana workspace nodes to organize and enrich data with structured metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNodeIdNoSCHEMA
nameYes
descriptionNo

Implementation Reference

  • Registration of the 'create_field' MCP tool. Includes inline Zod input schema (targetNodeId optional default 'SCHEMA', name required, description optional) and the handler function that creates a TanaPlainNode with supertag 'SYS_T02' (field definition) under the target node and calls tanaClient.createNode.
    this.server.tool( 'create_field', { 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_T02' }] }; 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 field: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } }
  • The handler function for the create_field tool. Constructs a plain node with the given name and description, tagged with supertag 'SYS_T02' for field definitions, creates it under targetNodeId (default 'SCHEMA'), and returns the result or error.
    async ({ targetNodeId, name, description }) => { try { const node: TanaPlainNode = { name, description, supertags: [{ id: 'SYS_T02' }] }; 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 field: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; }
  • Zod input schema for the create_field tool defining parameters: targetNodeId (optional, defaults to 'SCHEMA'), name (required string), description (optional string).
    targetNodeId: z.string().optional().default('SCHEMA'), name: z.string(), description: z.string().optional()
  • Documentation description of the create_field tool in the API docs resource.
    - \`create_field\`: Create new field definitions

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