Skip to main content
Glama

outline_list_documents

Retrieve documents from Outline, with options to filter by collection and limit results for efficient document management.

Instructions

List documents from Outline, optionally filtered by collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdNoOptional collection ID to filter documents
limitNoMaximum number of results to return (default: 25)

Implementation Reference

  • The implementation of the `listDocuments` method in `OutlineClient` which handles the API request to list Outline documents.
    async listDocuments(collectionId?: string, limit: number = 25): Promise<Document[]> {
      const payload: any = { limit };
      if (collectionId) {
        payload.collection = collectionId;
      }
    
      const endpoints = ['/api/documents.list', '/api/documents/list', '/api/documents', '/api/document/list'];
    
      for (const endpoint of endpoints) {
        try {
          console.error(`Trying endpoint: ${this.api.defaults.baseURL}${endpoint}`);
          const response = await this.api.post(endpoint, payload);
    
          // Debug: log the actual response structure
          console.error('Raw response data:', JSON.stringify(response.data, null, 2));
    
          const data = response.data.data || response.data;
          if (Array.isArray(data) && data.length > 0) {
            console.error('Sample document structure:', JSON.stringify(data[0], null, 2));
          }
    
          // Temporarily bypass schema validation and return raw data
          console.error('Returning raw document list:', JSON.stringify(data, null, 2));
          return data as Document[];
        } catch (error: any) {
          console.error(`Endpoint ${endpoint} failed:`, error.response?.status, error.response?.statusText);
          if (error.response?.status === 404 && endpoint !== endpoints[endpoints.length - 1]) {
            continue;
          }
          throw error;
        }
      }
      throw new Error('No valid endpoint found for listing documents');
    }
  • The MCP handler case for `outline_list_documents` in `src/index.ts`, which calls the client's `listDocuments` method.
    case 'outline_list_documents':
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              await this.outlineClient.listDocuments(args.collectionId as string, args.limit as number),
              null,
              2
            ),
          },
        ],
      };
  • src/index.ts:46-63 (registration)
    Tool registration for `outline_list_documents` including its schema definition.
      name: 'outline_list_documents',
      description: 'List documents from Outline, optionally filtered by collection',
      inputSchema: {
        type: 'object',
        properties: {
          collectionId: {
            type: 'string',
            description: 'Optional collection ID to filter documents',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results to return (default: 25)',
            default: 25,
          },
        },
        required: [],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails to mention critical traits: whether the operation is read-only (implied but not explicit), what data structure is returned, pagination behavior beyond the limit parameter, or any rate limiting concerns.

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

Conciseness4/5

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

The single-sentence description is extremely compact with no redundant words, front-loading the action 'List documents'. However, given the presence of sibling tools with similar purposes, the brevity may be excessive as it sacrifices necessary differentiation guidance.

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?

The description is inadequate given the tool ecosystem: it lacks an output schema and fails to explain the distinction between 'list' and 'search' functionality, which is critical for correct agent selection. For a tool with zero required parameters and multiple document-related siblings, more contextual guidance is needed.

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?

Input schema has 100% description coverage with clear documentation for both 'collectionId' and 'limit' parameters. The description mentions filtering by collection, aligning with the schema, but adds no additional semantic context (e.g., explaining Outline's collection hierarchy) beyond what the schema already provides. Baseline 3 is appropriate given complete schema coverage.

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 'List' and resource 'documents from Outline', establishing the core function. However, it does not explicitly differentiate from the sibling tool 'outline_search_documents', leaving ambiguity about when to use listing versus searching.

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

Usage Guidelines3/5

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

The phrase 'optionally filtered by collection' provides implied usage context for when filtering is needed. However, it lacks explicit guidance on when to prefer this tool over 'outline_search_documents' or 'outline_get_document', and states no prerequisites or exclusions.

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/HelicopterHelicopter/outline-mcp-server'

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