update_folder_name
Change the name of a folder in Carbon Voice using its unique ID. Modify folder names to organize conversations and voice memos effectively.
Instructions
Update a folder name by its ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | New Folder Name |
Implementation Reference
- src/server.ts:691-718 (registration)Registers the MCP tool 'update_folder_name' with input schema and inline handler function that calls the generated API after authentication.server.registerTool( 'update_folder_name', { description: 'Update a folder name by its ID.', inputSchema: updateFolderNameParams.merge(updateFolderNameBody).shape, annotations: { readOnlyHint: false, destructiveHint: false, }, }, async ( args: UpdateFolderNameInput, { authInfo }, ): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.updateFolderName( args.id, args, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error updating folder name:', { error }); return formatToMCPToolResponse(error); } }, );
- src/server.ts:701-717 (handler)The handler function for the 'update_folder_name' tool, which extracts id and name from args, sets auth header, calls simplifiedApi.updateFolderName, and formats the response.async ( args: UpdateFolderNameInput, { authInfo }, ): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.updateFolderName( args.id, args, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error updating folder name:', { error }); return formatToMCPToolResponse(error); } },
- Zod validation schemas for path parameter 'id' and body 'name' used in the tool inputSchema.export const updateFolderNameParams = zod.object({ "id": zod.string() }) export const updateFolderNameBody = zod.object({ "name": zod.string().describe('New Folder Name') })
- TypeScript type for tool input, inferring from Zod params and body schemas.export type UpdateFolderNameInput = z.infer<typeof updateFolderNameParams> & z.infer<typeof updateFolderNameBody>;
- Generated API client method called by the handler; performs PATCH request to update folder name via HTTP.const updateFolderName = ( id: string, updateFolderNamePayload: UpdateFolderNamePayload, options?: SecondParameter<typeof mutator>, ) => { return mutator<Folder>( { url: `/simplified/folders/${id}`, method: 'PATCH', headers: { 'Content-Type': 'application/json' }, data: updateFolderNamePayload, }, options, ); };