Skip to main content
Glama

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

Implementation Reference

  • 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; },
  • 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' ),
  • Mapping of get_collection_structure tool name to its Zod schema in the central toolSchemas registry.
    get_collection_structure: getCollectionStructureSchema,
  • TypeScript type definition for the input of get_collection_structure, inferred from the Zod schema.
    export type GetCollectionStructureInput = z.infer<typeof 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-smart-mcp'

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