get_collection_structure
Retrieve document hierarchy and structure for collections in Outline wiki to understand organization and relationships.
Instructions
Get document hierarchy within a collection.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collectionId | Yes |
Implementation Reference
- src/lib/handlers/search.ts:63-68 (handler)The main handler function implementing the get_collection_structure tool. It calls the Outline API /collections.documents endpoint with the collection ID to retrieve the collection's document structure.async get_collection_structure(args: GetCollectionStructureInput) { const { data } = await apiCall(() => apiClient.post<unknown>('/collections.documents', { id: args.collectionId }) ); return data; },
- src/lib/schemas.ts:34-34 (schema)Zod input schema for the tool, defining the required collectionId parameter as a UUID string.export const getCollectionStructureSchema = z.object({ collectionId });
- src/lib/tools.ts:51-55 (registration)Registers the tool in the MCP tools list (allTools), providing name, description, and referencing the Zod schema for JSON schema conversion.createTool( 'get_collection_structure', 'Get document hierarchy within a collection.', 'get_collection_structure' ),
- src/lib/schemas.ts:216-216 (registration)Maps the tool name to its Zod schema in the central toolSchemas object used across the application.get_collection_structure: getCollectionStructureSchema,
- src/lib/handlers/index.ts:21-21 (registration)Includes the search handlers (containing get_collection_structure) in the combined all handlers object for the MCP server....createSearchHandlers(ctx),