Skip to main content
Glama

create_collection

Create a new collection in Outline wiki to organize documents, enabling structured content management and grouping related materials.

Instructions

Create a new collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionNo
colorNo

Implementation Reference

  • The main handler function for the 'create_collection' tool. It validates access, constructs 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 for create_collection tool: name (required), description and color (optional).
    export const createCollectionSchema = z.object({ name: z.string().min(1, 'Name is required'), description: z.string().optional(), color: hexColor.optional(), });
  • Registration of the 'create_collection' tool in the allTools array, providing name, description, and linking to the Zod schema via createTool function.
    createTool( 'create_collection', 'Create a new collection.', 'create_collection' ),
  • The createCollectionHandlers (which includes create_collection) is spread into the combined ToolHandlers object in createAllHandlers.
    ...createCollectionHandlers(ctx), ...createCommentHandlers(ctx),
  • The create_collection schema is mapped in the toolSchemas record used for tool definitions.
    create_collection: createCollectionSchema,

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-wiki-mcp'

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