Skip to main content
Glama

update_collection

Modify collection details in Outline wiki, including name, description, and color, to organize and categorize documents effectively.

Instructions

Update collection information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdYes
nameNo
descriptionNo
colorNo

Implementation Reference

  • The main handler function for the 'update_collection' tool. Performs access control 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); },
  • Zod schema definition for the input parameters of the update_collection tool, including optional name, description, and color updates for a given collectionId.
    export const updateCollectionSchema = z.object({ collectionId, name: z.string().min(1).optional(), description: z.string().optional(), color: hexColor.optional(), });
  • Registers the 'update_collection' tool in the MCP tools list by creating its definition with name, description, and input schema derived from Zod.
    createTool( 'update_collection', 'Update collection information.', 'update_collection' ),
  • TypeScript type inferred from the updateCollectionSchema for use in handler function signatures.
    export type UpdateCollectionInput = z.infer<typeof updateCollectionSchema>;
  • Includes 'update_collection' in the set of write operation tools for access control checks.
    const WRITE_TOOLS = new Set([ 'create_document', 'update_document', 'move_document', 'archive_document', 'unarchive_document', 'delete_document', 'restore_document', 'add_comment', 'create_collection', 'update_collection', 'delete_collection', 'batch_create_documents', 'batch_update_documents', 'batch_move_documents', 'batch_archive_documents', 'batch_delete_documents', ]);

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/huiseo/outline-smart-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server