update_collection
Modify collection details like name, description, and color in Outline wiki to organize and categorize documents effectively.
Instructions
Update collection information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collectionId | Yes | ||
| name | No | ||
| description | No | ||
| color | No |
Implementation Reference
- src/lib/handlers/collections.ts:42-54 (handler)The core handler function for the 'update_collection' tool. Performs access check, constructs payload from input args, calls the Outline API to update the collection, and returns formatted result.async update_collection(args: UpdateCollectionInput) { checkAccess(config, 'update_collection'); const payload: Record<string, unknown> = { id: args.collectionId }; if (args.name) payload.name = args.name; if (args.description !== undefined) payload.description = args.description; if (args.color) payload.color = args.color; const { data } = await apiCall(() => apiClient.post<OutlineCollection>('/collections.update', payload) ); return colResult(data, MESSAGES.COLLECTION_UPDATED); },
- src/lib/schemas.ts:99-104 (schema)Zod schema defining the input parameters for the update_collection tool: collectionId (required UUID), optional name, description, and color.export const updateCollectionSchema = z.object({ collectionId, name: z.string().min(1).optional(), description: z.string().optional(), color: hexColor.optional(), });
- src/lib/tools.ts:151-155 (registration)Registers the 'update_collection' tool in the MCP tools list, providing name, description, and linking to its Zod schema for input validation.createTool( 'update_collection', 'Update collection information.', 'update_collection' ),