Skip to main content
Glama
huiseo
by huiseo

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,
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get document hierarchy', implying a read-only operation, but doesn't specify whether this includes metadata, permissions, recursion depth, or error handling. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior and limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple tool and front-loaded with the essential action, making it efficient for an agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (retrieving hierarchical data), lack of annotations, no output schema, and low schema description coverage, the description is incomplete. It doesn't address what the hierarchy includes (e.g., folders, documents, metadata), potential limitations, or return format, making it inadequate for the agent to fully understand the tool's context and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic context. The description mentions 'within a collection', which implicitly relates to the 'collectionId' parameter, adding some meaning. However, it doesn't explain what a collectionId is, its format (UUID), or how to obtain it, leaving the parameter only partially clarified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'document hierarchy within a collection', which is specific and actionable. However, it doesn't distinguish this tool from potential siblings like 'list_collections' or 'get_document', which might also retrieve hierarchical or collection-related data, leaving room for ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'list_collections' (which might list top-level collections) and 'get_document' (which retrieves individual documents), there's no indication of context, prerequisites, or exclusions, leaving the agent to infer usage based on the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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