Tools Overview
Linkly AI exposes seven tools to AI assistants via MCP (Model Context Protocol), forming a progressive document access workflow:list_libraries (list knowledge libraries), explore (overview of document collections), and find_paths (locate folder paths by keyword to feed search’s path_glob).
search
Search documents and find relevant results
outline
View document outlines to understand structure
grep
Find specific text patterns with regex matching
read
Read document content for detailed information
list_libraries
List knowledge libraries and their document counts
explore
Overview of document collection themes and structure
find_paths
Locate folder paths by keyword to feed
search’s path_globSearch
Searches indexed local documents and returns a list of the most relevant results.Parameters
About time filtering and sorting:
- When the user gives an explicit window (“last month”, “in 2024”, “in the last three months”), use
modified_after/modified_before. - When the user only says “recent”, “latest”, “earliest” without a fixed window, use
time_sort=newestoroldest. - The two can combine: “earliest in 2024” is
modified_after=2024-01-01+modified_before=2024-12-31+time_sort=oldest. - For relative dates (“last month”), first read the current UTC time from the
[meta] now=...field at the end of any tool response, then compute the date — see Response Metadata below.
Response Fields
Each search result contains the following information:Usage Examples
Outline
Retrieves the structured outline and metadata of one or more documents, helping to quickly understand document structure and locate target sections.Parameters
When to Use Outline
The outline feature works best with bookmarked PDFs, Markdown,
DOCX, PowerPoint (PPTX), and EPUB documents. It is especially effective when
reading lengthy documents and books. Outline support for plain text and
unbookmarked PDFs will be added in future iterations.
Usage Examples
Grep
Locate specific lines within a single document by regex pattern. Best for documents withhas_outline=false where outline is unavailable. Use after search to pinpoint exact positions of names, dates, terms, identifiers, or any pattern — then use read with offset to see full context. Works on all document types (PDF, Markdown, DOCX, PPTX, EPUB, TXT, HTML). For searching across multiple documents, call grep once per document.
Parameters
When to Use Grep vs Outline
Usage Examples
Read
Reads document content with line number positioning and pagination, suitable for reading specific parts of long documents. The Read tool behaves consistently with the Claude AI SDK, ensuring optimal results across various Agentic AI models.Parameters
Content Format
TheRead tool returns content with line numbers for easy reference and positioning:
Pagination Strategy
For long documents, it is recommended to read in chunks:read to precisely retrieve the content within that range.
Usage Examples
List Libraries
Lists all knowledge libraries configured by the user, along with their descriptions and document counts.Parameters
No parameters required.Use Cases
- When the user asks “what libraries do I have?”
- Before using the
libraryparameter insearch, to verify a library name
Explore
Get a bird’s-eye overview of all indexed documents or a specific library. Returns document type distribution, directory structure (with file counts and median word counts), and top keywords (with source attribution).Parameters
Use Cases
- The user wants to know what’s in their knowledge base or document collection
- The user doesn’t have a specific search topic and wants to discover available themes and directions
- The AI assistant needs to understand the scale and topic distribution to formulate effective search strategies
search queries.
Find Paths (find_paths)
Fuzzy-matches keywords against the file path field of indexed documents, aggregates matches at folder granularity, and returns the top folder candidates. It is positioned as a helper forsearch: when the user names a container (“in my Notion notes”, “in my Dropbox papers folder”) but you don’t know its on-disk path, call find_paths first to discover the real path, then pass it as path_glob to search.
The actual folder name on disk often differs from the user’s spoken name (e.g. an export might live under Notion-Export-c58e430f... rather than just Notion), so guessing a path_glob directly is fragile.
Parameters
Response Fields (JSON mode)
Aggregation behaviour
- Files whose patterns only match the filename segment (no matching directory segment) are silently dropped — this is a “find folders” tool, not a “find files” tool. If a query yields zero candidate folders even though matching files exist, fall back to calling
searchdirectly. - Each match is bucketed by the shallowest position of any pattern in the path, truncated at the next
/. Solocal:///Users/me/Documents/Notion-Export-abc/workspace/page.mdmatched byNotionaggregates under.../Documents/Notion-Export-abc, regardless of how deep the file lives.
When to use
- The user names a container with a fuzzy or cross-language word (“in my Notion notes”, “in my Dropbox papers folder”, “in my work backup”) and you don’t know the actual path
- Call before
searchto determine the rightpath_glob
When not to use
- Pure content / topic queries (“find resumes”, “find AI papers”) — call
searchdirectly; its hybrid retrieval already covers title, filename, content, and path - Filter by file type only (“all PDFs”) — call
searchwithpath_glob="*.pdf"directly - Vague queries with no container intent (“find recent stuff”) — call
search
Usage example
Response Metadata
Every successful tool response carries the current UTC time so callers can compute relative dates (“last month”, “this year”, “in the last 30 days”) without relying on the model’s training cutoff.-
Markdown output: a footer block at the end of the response, formatted as:
-
JSON output: a top-level
_metaobject:
isError: true) do not include this metadata — the error body itself already conveys the cause, and adding a timestamp would only dilute the signal.
When the user uses a relative date, read now from the most recent tool response, compute the corresponding ISO 8601 date, and pass it to search’s modified_after / modified_before.
Workflow Examples
Complete Workflow: CLI Method
The following example demonstrates how to perform a complete document retrieval via CLI:Complete Workflow: MCP Method
When AI assistants call tools via the MCP protocol, the request format is as follows:FAQ
What document formats are supported?
What document formats are supported?
Linkly AI currently supports the following formats:
What if an outline is not available?
What if an outline is not available?
If a document has no available outline (
has_outline: false), you can:- Use the
readtool directly to browse the document content page by page - Read the beginning of the document first (default 200 lines) to get a general idea, then decide whether to continue reading
How to handle long documents?
How to handle long documents?
Recommended workflow:
- First use
outlineto understand the document structure (if an outline is available) - Based on the line ranges in the outline, use the
offsetandlimitparameters ofreadto precisely read target sections - Read up to 500 lines at a time, and paginate by adjusting
offset
What is the default port for the MCP service?
What is the default port for the MCP service?
The default port is 60606. If that port is occupied, the application will automatically try other ports. You can check the actual port in use in Linkly AI Desktop’s settings.
What if search results are inaccurate?
What if search results are inaccurate?
You can try:
- Using more precise keywords
- Using natural language descriptions (leveraging vector semantic matching)
- Mixing keywords and synonyms, e.g.
"authentication auth login sign-in" - Using
--typeto filter specific document types and narrow the search scope

