Skip to main content
Glama

search_documents

Read-onlyIdempotent

Search across documents in your knowledge base using keywords. Get ranked results with content snippets, pagination, and optional collection filter.

Instructions

    Searches for documents using keywords or phrases across your knowledge
    base.

    IMPORTANT: The search performs full-text search across all document
    content and titles. Results are ranked by relevance, with exact
    matches
    and title matches typically ranked higher. The search will return
    snippets of content (context) where the search terms appear in the
    document. You can limit the search to a specific collection by
    providing
    the collection_id.

    PAGINATION: By default, returns up to 25 results at a time. If more
    results exist, use the 'offset' parameter to fetch additional pages.
    For example, use offset=25 to get results 26-50, offset=50 for
    51-75, etc.

    STATUS FILTER: By default, searches published documents only. Pass
    status_filter to include other document states. Allowed values are
    "draft", "archived", and "published".

    Use this tool when you need to:
    - Find documents containing specific terms or topics
    - Locate information across multiple documents
    - Search within a specific collection using collection_id
    - Discover content based on keywords
    - Browse through large result sets using limit and offset

    Args:
        query: Search terms (e.g., "vacation policy" or "project plan")
        collection_id: Optional collection to limit the search to
        limit: Maximum results to return (default: 25, max: 100)
        offset: Number of results to skip for pagination (default: 0)
        status_filter: Optional list of statuses to search. Allowed values
            are "draft", "archived", and "published". Defaults to
            ["published"] when omitted.

    Returns:
        Formatted string containing search results with document titles,
        contexts, and pagination information
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
collection_idNo
limitNo
offsetNo
status_filterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already provide readOnlyHint and idempotentHint. Description adds details on full-text search, ranking, snippet generation, pagination, and status filtering, significantly extending transparency.

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?

Well-organized with clear sections and front-loaded purpose. Slightly verbose in use cases, but every sentence adds value.

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

Completeness5/5

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

Comprehensive coverage of search behavior, pagination, status filtering, and all parameters. Output schema is implied via return description. Sufficient for effective use.

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

Parameters5/5

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

Schema description coverage is 0%, but the description includes an Args section that fully explains all five parameters, their defaults, allowed values, and meanings.

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?

Clearly states search for documents with keywords across knowledge base. Specific verb and resource, but does not explicitly differentiate from sibling 'search_document_content'.

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

Usage Guidelines4/5

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

Lists multiple scenarios for usage (find specific terms, locate info across documents, etc.) and describes pagination and status filter defaults. Does not specify when not to use or compare to alternatives.

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

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