Skip to main content
Glama

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

Implementation Reference

  • 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; },
  • 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' ),
  • Maps the tool name to its Zod schema in the central toolSchemas object used across the application.
    get_collection_structure: getCollectionStructureSchema,
  • Includes the search handlers (containing get_collection_structure) in the combined all handlers object for the MCP server.
    ...createSearchHandlers(ctx),

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

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