Skip to main content
Glama

set_node_name

Rename nodes in Tana workspaces by specifying the node ID and new name to update data organization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYes
newNameYes

Implementation Reference

  • Registration of the 'set_node_name' MCP tool, including input schema (nodeId and newName as strings) and the handler function that calls tanaClient.setNodeName and returns formatted result or error.
    this.server.tool( 'set_node_name', { nodeId: z.string(), newName: z.string() }, async ({ nodeId, newName }) => { try { const result = await this.tanaClient.setNodeName(nodeId, newName); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ], isError: false }; } catch (error) { return { content: [ { type: 'text', text: `Error setting node name: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } } );
  • Core handler function in TanaClient that executes the API request to set the node name via POST to Tana API, handling response parsing.
    async setNodeName(targetNodeId: string, newName: string): Promise<TanaNodeResponse> { const request: TanaSetNameRequest = { targetNodeId, setName: newName }; const response = await this.makeRequest(request); // Handle the different response format for setName if (response.children && response.children.length > 0) { return response.children[0]; } // If the response doesn't match expected format, make a best guess return { nodeId: targetNodeId }; }
  • Zod schema for 'set_node_name' tool inputs: nodeId and newName as strings.
    nodeId: z.string(), newName: z.string() },

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