get_collection_structure
Retrieve the hierarchical structure of documents within an Outline wiki collection 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 core handler function that implements the get_collection_structure tool by calling the Outline API endpoint '/collections.documents' with the provided collectionId and returning the data.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 definition for the get_collection_structure tool, requiring a collectionId (UUID).export const getCollectionStructureSchema = z.object({ collectionId });
- src/lib/schemas.ts:173-173 (schema)TypeScript type inferred from the getCollectionStructureSchema for type safety in handlers.export type GetCollectionStructureInput = z.infer<typeof getCollectionStructureSchema>;
- src/lib/tools.ts:51-55 (registration)Tool registration in the allTools array, defining the MCP tool with name, description, and reference to its schema.createTool( 'get_collection_structure', 'Get document hierarchy within a collection.', 'get_collection_structure' ),
- src/lib/schemas.ts:216-216 (registration)Schema registration in the central toolSchemas object mapping tool names to their Zod schemas.get_collection_structure: getCollectionStructureSchema,