Skip to main content
Glama

outline_search_documents

Search for documents in Outline using text queries to find relevant content quickly and manage information retrieval.

Instructions

Search for documents in Outline

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to find documents
limitNoMaximum number of results to return (default: 25)

Implementation Reference

  • Handler for 'outline_search_documents' inside the CallToolRequest handler.
    case 'outline_search_documents':
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              await this.outlineClient.searchDocuments(args.query as string, args.limit as number),
              null,
              2
            ),
          },
        ],
      };
  • The actual implementation of searching documents within the OutlineClient class.
    async searchDocuments(query: string, limit: number = 25): Promise<Document[]> {
      const endpoints = ['/api/documents.search', '/api/documents/search', '/api/document/search'];
    
      for (const endpoint of endpoints) {
        try {
          const response = await this.api.post(endpoint, { query, limit });
          return response.data.data || response.data;
        } catch (error: any) {
          if (error.response?.status === 404 && endpoint !== endpoints[endpoints.length - 1]) {
            console.error(`Endpoint ${endpoint} not found, trying next...`);
            continue;
          }
          throw error;
        }
      }
      throw new Error('No valid endpoint found for searching documents');
    }
  • Registration and schema definition for 'outline_search_documents'.
    {
      name: 'outline_search_documents',
      description: 'Search for documents in Outline',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query to find documents',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results to return (default: 25)',
            default: 25,
          },
        },
        required: ['query'],
      },
    },
Behavior2/5

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

No annotations are provided, and the description discloses no behavioral traits beyond the basic action. It fails to indicate whether the search covers document titles, body content, or both; how results are ranked; or whether the operation is read-only versus generating server load.

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 description consists of a single, efficient sentence with no redundant words or tautology. However, given the lack of annotations and output schema, it may be overly terse, sacrificing necessary behavioral context for extreme brevity.

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?

With no output schema and no annotations, the description should explain the search scope (titles vs. content), result format, or pagination behavior. It provides none of this context, leaving significant uncertainty about what the tool returns and how it behaves.

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 100% description coverage for both parameters (query and limit), clearly documenting their purpose and default values. The description adds no additional semantic information beyond what the schema already provides, meeting the baseline for high-coverage schemas.

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 'Search for documents in Outline' provides a clear verb (search) and resource (documents in Outline). However, it fails to distinguish this tool from sibling `outline_list_documents`, which also retrieves documents but likely without full-text search capabilities.

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 offers no guidance on when to use this tool versus alternatives like `outline_list_documents` or `outline_get_document`. It does not clarify that this tool is intended for full-text search queries rather than browsing or direct document retrieval.

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