get_collection_structure
Retrieve document hierarchy within a collection to understand organization and relationships between documents in Outline wiki.
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 handler function that implements the get_collection_structure tool by calling the Outline API endpoint '/collections.documents' with the provided collectionId.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 get_collection_structure tool, requiring a valid UUID collectionId.export const getCollectionStructureSchema = z.object({ collectionId });
- src/lib/tools.ts:51-55 (registration)Registration of the get_collection_structure tool in the allTools array, providing name, description, and schema reference for MCP tool definition.createTool( 'get_collection_structure', 'Get document hierarchy within a collection.', 'get_collection_structure' ),
- src/lib/schemas.ts:216-216 (schema)Mapping of get_collection_structure tool name to its Zod schema in the central toolSchemas registry.get_collection_structure: getCollectionStructureSchema,
- src/lib/schemas.ts:173-173 (registration)TypeScript type definition for the input of get_collection_structure, inferred from the Zod schema.export type GetCollectionStructureInput = z.infer<typeof getCollectionStructureSchema>;