Skip to main content
Glama

create_collection

Create a new collection in Outline Wiki to organize documents by name, description, and color for better content management.

Instructions

Create a new collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionNo
colorNo

Implementation Reference

  • The main execution logic for the create_collection tool. It validates access, builds the payload from input args, calls the API to create the collection, and returns the result with a success message.
    async create_collection(args: CreateCollectionInput) { checkAccess(config, 'create_collection'); const payload: Record<string, unknown> = { name: args.name }; if (args.description) payload.description = args.description; if (args.color) payload.color = args.color; const { data } = await apiCall(() => apiClient.post<OutlineCollection>('/collections.create', payload) ); return colResult(data, MESSAGES.COLLECTION_CREATED); },
  • Zod schema defining the input parameters for the create_collection tool: required name, optional description and color.
    export const createCollectionSchema = z.object({ name: z.string().min(1, 'Name is required'), description: z.string().optional(), color: hexColor.optional(), });
  • Registers the create_collection tool in the allTools array by calling createTool with name, description, and schema key, converting Zod schema to JSON schema for MCP.
    createTool( 'create_collection', 'Create a new collection.', 'create_collection' ),
  • Includes the createCollectionHandlers (containing create_collection) into the combined ToolHandlers object in createAllHandlers.
    ...createCollectionHandlers(ctx), ...createCommentHandlers(ctx),

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