update_tag
Update a tag's name by providing its ID and a new name.
Instructions
Update a tag
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tagId | Yes | The ID of the tag to update | |
| name | Yes | New name for the tag |
Implementation Reference
- src/tools.ts:273-290 (registration)Tool registration for 'update_tag' defining its name, description, and input schema (tagId + name, both required).
{ name: "update_tag", description: "Update a tag", inputSchema: { type: "object", properties: { tagId: { type: "string", description: "The ID of the tag to update", }, name: { type: "string", description: "New name for the tag", }, }, required: ["tagId", "name"], }, }, - src/handlers.ts:55-58 (schema)Zod validation schema (UpdateTagSchema) defining 'tagId' (string) and 'name' (string) for the update_tag tool.
const UpdateTagSchema = z.object({ tagId: z.string(), name: z.string(), }); - src/handlers.ts:146-149 (handler)Handler case for 'update_tag' — parses args with UpdateTagSchema and calls client.updateTag().
case "update_tag": { const { tagId, name } = UpdateTagSchema.parse(args); return await client.updateTag(tagId, name); } - src/n8n-client.ts:149-152 (helper)N8nClient.updateTag method — sends PATCH request to /api/v1/tags/{id} with the new name.
async updateTag(id: string, name: string) { const response = await this.client.patch(`/api/v1/tags/${id}`, { name }); return response.data; }