update_wiki_node
Renames a wiki node in a given space using the node token and new title. Only the title is updated; content is managed by other tools.
Instructions
[Official API] Rename a Wiki node (only title is updatable via the wiki API; the underlying resource content is edited via docx/bitable/sheet tools).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | Wiki space ID | |
| node_token | Yes | Wiki node token (wikcnXXX) | |
| title | Yes | New title |
Implementation Reference
- src/tools/wiki.js:136-138 (handler)The handler function for the 'update_wiki_node' tool. Calls ctx.getOfficialClient().updateWikiNodeTitle(args.space_id, args.node_token, args.title).
async update_wiki_node(args, ctx) { return json(await ctx.getOfficialClient().updateWikiNodeTitle(args.space_id, args.node_token, args.title)); }, - src/tools/wiki.js:59-71 (schema)The schema/input definition for the 'update_wiki_node' tool defining its name, description, and inputSchema (space_id, node_token, title).
{ name: 'update_wiki_node', description: '[Official API] Rename a Wiki node (only `title` is updatable via the wiki API; the underlying resource content is edited via docx/bitable/sheet tools).', inputSchema: { type: 'object', properties: { space_id: { type: 'string', description: 'Wiki space ID' }, node_token: { type: 'string', description: 'Wiki node token (wikcnXXX)' }, title: { type: 'string', description: 'New title' }, }, required: ['space_id', 'node_token', 'title'], }, }, - src/server.js:37-57 (registration)Tool registration: TOOL_MODULES array includes require('./tools/wiki'), TOOLS = schemas flattened, HANDLERS = map of handler name to function. The update_wiki_node handler is registered via HANDLERS lookup on line 396.
const TOOL_MODULES = [ require('./tools/bitable'), require('./tools/calendar'), require('./tools/contacts'), require('./tools/diagnostics'), require('./tools/docs'), require('./tools/drive'), require('./tools/events'), require('./tools/groups'), require('./tools/im-read'), require('./tools/messaging-bot'), require('./tools/messaging-user'), require('./tools/okr'), require('./tools/profile'), require('./tools/tasks'), require('./tools/uploads'), require('./tools/wiki'), ]; const TOOLS = TOOL_MODULES.flatMap((m) => m.schemas); const HANDLERS = Object.fromEntries(TOOL_MODULES.flatMap((m) => Object.entries(m.handlers))); - src/clients/official/wiki.js:98-113 (helper)The client-side helper method updateWikiNodeTitle(spaceId, nodeToken, title) that calls the Feishu API endpoint /open-apis/wiki/v2/spaces/{spaceId}/nodes/{nodeToken}/update_title using _asUserOrApp for UAT-first execution.
// Rename a wiki node. Feishu's SDK exposes this as updateTitle (the // underlying API is /open-apis/wiki/v2/spaces/{space_id}/nodes/{token}/update_title). async updateWikiNodeTitle(spaceId, nodeToken, title) { if (!spaceId) throw new Error('updateWikiNodeTitle: spaceId is required'); if (!nodeToken) throw new Error('updateWikiNodeTitle: nodeToken is required'); if (!title) throw new Error('updateWikiNodeTitle: title is required'); const data = { title }; const res = await this._asUserOrApp({ uatPath: `/open-apis/wiki/v2/spaces/${encodeURIComponent(spaceId)}/nodes/${encodeURIComponent(nodeToken)}/update_title`, method: 'POST', body: data, sdkFn: () => this.client.wiki.spaceNode.updateTitle({ path: { space_id: spaceId, node_token: nodeToken }, data }), label: 'updateWikiNodeTitle', }); return { ok: res.code === 0, viaUser: !!res._viaUser, fallbackWarning: res._fallbackWarning || null }; },