Skip to main content
Glama

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
NameRequiredDescriptionDefault
collectionIdYes

Implementation Reference

  • 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; },
  • Zod input schema definition for the get_collection_structure tool, requiring a collectionId (UUID).
    export const getCollectionStructureSchema = z.object({ collectionId });
  • 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' ),
  • Schema registration in the central toolSchemas object mapping tool names to their Zod schemas.
    get_collection_structure: getCollectionStructureSchema,

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