Skip to main content
Glama

Linkly AI

search

Read-only

[Workflow: search → grep or outline → read] Search indexed documents with a natural-language question. Returns the most relevant documents with titles, paths, types, and text snippets.

After finding target documents, use 'outline' to get summaries in batch or 'grep' to find specific patterns, then use 'read' to read specific sections of interest. When the user names a container by a fuzzy or cross-language word ("WeChat", "Notion notes"), call find_paths first to discover what path_glob to pass.

Scope: omit library to search across your local indexed content (default — Desktop tunnel must be online; cloud libraries are NOT included). Pass library="local://<id>" to scope to one local library, or library="cloud://<owner>/<slug>" to query a linked cloud library. To search across cloud libraries, call list_libraries first to see what is available, then call search once per cloud library.

Set scope="notes" to full-text search the user's markdown card notes instead of indexed documents (use tags to narrow by note tag). Notes live only on the Desktop, so that always rides the tunnel and cannot be combined with a cloud:// library.

Size fields (Desktop-local documents): word_count counts words (one per CJK character or Latin word; whitespace/punctuation/markup excluded) and reads well below a Chinese user's 字数; char_count counts Unicode characters of the extracted body (whitespace/punctuation/markup included, CR excluded) — the figure to match what the user sees. null/omitted char_count = not yet computed (or an older Desktop), not an empty body; read on a local document returns it whenever the Desktop supports it. cloud:// items do not carry char_count.

User annotations: the user's own highlights, notes and comments on clips are searched too. Each result carries matched_in ("content" and/or "annotations"); the Markdown output marks such snippets with "(in annotations)". Pass scope="annotations" to search only the annotation text (keyword-only, no field-qualified clauses). Annotations exist only on the Desktop; cloud:// results do not carry matched_in.

Match source: each result carries matched_by: "keyword" (keyword search found it), "both" (keyword and semantic search), or "semantic" (only semantic search found it; it may not contain the query's words, so treat it as weaker evidence). A query that is only a number of six or more digits, such as an ID or a tax or phone number, runs keyword search only, so it gets no semantic-only hits; separators (.,-/()+, spaces) and up to two letters in a row may be part of it. A shorter number such as a year, or a number with a word (CNPJ 98.765.432/0001-10), runs both searches. Both hold for Desktop results only: cloud:// results do not carry matched_by, and a number query on a cloud library may still run semantic search.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoFilter results to documents carrying ALL of the given note tags (AND semantics). Tags are normalized (leading '#' stripped, ASCII lowercased). For OR semantics, issue one call per tag and union the results yourself. Most useful together with scope="notes".
limitNoMaximum number of results to return (default: 20, max: 50)
queryYesOne complete natural-language question that states what you are looking for, keeping the names, dates and terms the user gave. If the document may be in a different language from the user's, write the question in the user's language and then again in that other language, in the same query string. Prefer this over a keyword list: search is hybrid (keyword + semantic), and the semantic side works on meaning, so a full sentence usually finds more than a bag of keywords. Keyword queries are also supported: use the distinctive words the document itself would contain (names, terms, an exact identifier, code or error message), in the document's language. Unfiltered searches use hybrid BM25 + vector retrieval. When a backend cannot apply requested filters before ANN Top-K, it uses winner-first BM25 instead so filtered-out rows cannot consume the candidate window. A query that is only a number of six or more digits, such as an ID or a tax or phone number (`98.765.432/0001-10`), runs keyword search only on the Desktop; a shorter number, or one with a word, runs both, and a cloud library may still run semantic search for it.
scopeNoSearch scope. "folder" (default) searches all indexed content with the existing `library`/`path_glob` semantics. "notes" restricts results to the local Notes folder (markdown card notes) and ignores `library`/`path_glob`. Notes exist only on the user's Desktop — there is no cloud notes store — so scope="notes" always rides the Desktop tunnel and cannot be combined with a `cloud://` library. "annotations" matches only the text of the user's own annotations (notes and comments written in the clip reader, stored next to the Markdown as `<stem>.annotations.json`), so only documents that carry annotations are returned; `library`, `path_glob` and the other filters still apply, and field-qualified query clauses such as `content:x` are rejected in this scope. Annotations likewise exist only on the user's Desktop — cloud libraries carry none, their results do not carry `matched_in`, and scope="annotations" is rejected when combined with a `cloud://` library. Every result carries `matched_in` ("content" and/or "annotations") telling which part of the document produced a keyword hit (empty when only semantic search found it; `matched_by` says which search did); the default scope searches annotations as well. Unknown values are rejected. Sending `null` or omitting the field both yield the default.
libraryNoRestrict search to a specific library. Use `local://<library-id>` to target a local library or `cloud://<owner>/<slug>` to target a cloud library. Plain string is interpreted as a local library name for backward compatibility. Cloud library identifiers must use the `owner/slug` form (e.g. `cloud://acme/handbook`); a single-segment name is rejected. Use list_libraries to see available libraries. Omit to search all your local indexed content (default scope).
doc_typesNoFilter by document type name, as reported in the doc_type field of each result (e.g. ["pdf", "md", "docx"]). Type name, not extension. This is not a closed set — newly supported types appear there without a schema change.
path_globNoGlob pattern to filter by file path, matched as a SUBSTRING of the path — the pattern may appear anywhere, you do NOT need leading or trailing wildcards. Syntax: * matches any characters (including /), ? matches exactly one character, [...] matches a character class. Always case-sensitive. Examples: '*.pdf' for all PDFs, 'papers' for paths containing 'papers', '/Users/me/notes/' to scope to everything under that directory (a full absolute directory path works directly — keep the trailing '/'). When the user names a specific folder/container by a fuzzy or cross-language word and the actual path is unknown, call `find_paths` first and use a distinctive segment of the returned path here.
time_sortNoReorder the matched candidate set by modification time. "default" (default) preserves the backend relevance order (hybrid when eligible, otherwise BM25); "newest" puts the most recently modified first; "oldest" puts the earliest first. Use "newest" for "recent / latest / most-recent" intent without a fixed time window. Combine with `modified_after`/`modified_before` for "latest in 2024" style queries. Sending `null` or omitting the field both yield the default.
output_formatNoOutput format. Defaults to "markdown" (human-readable); set to "json" for structured JSON (machine-parseable). Sending `null` or omitting the field both yield the default.
modified_afterNoInclusive lower bound on file modification time. Accepts an ISO 8601 string interpreted as UTC: either a bare date (e.g. "2024-01-01", expanded to 00:00:00Z) or a full RFC 3339 datetime (e.g. "2024-01-01T00:00:00Z"). Use for explicit windows like "after January 2024" or "in 2024". For "recent" / "latest" without a fixed window, prefer `time_sort=newest`. Read the current time from any tool response's `[meta] now=…` line / `_meta.now` field to compute relative dates ("last month").
modified_beforeNoInclusive upper bound on file modification time. Same format as `modified_after` (ISO 8601 UTC; bare date or RFC 3339).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=true and openWorldHint=false; the description adds substantial behavior beyond that — the Desktop tunnel requirement, cloud vs local scope limits, matched_by/matched_in provenance semantics, and the keyword-only path for long numeric queries. However, the wording is often imprecise (e.g. "always rides the tunnel"), which leaves the exact failure mode when the tunnel is offline unspecified. Strong added context, but with residual ambiguity for a read tool whose annotations already cover safety.

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

Conciseness3/5

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

The workflow and scope rules are correctly front-loaded, and the bolded headers help scanning. But the long-numeric-query rule appears twice (body and query parameter), and the word_count/char_count paragraph is response-detail that padding the read. Roughly a third of the text could be cut without losing decision-relevant information.

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?

There is no output schema, and the description fills that gap by documenting result fields (matched_in, matched_by, char_count null semantics) and how citations are marked. For an 11-parameter hybrid search tool, an agent has enough to call it correctly and interpret what comes back.

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?

Schema description coverage is 100% and the parameter descriptions are themselves very detailed, so the baseline is 3. The description mostly restates that content (library forms, scope behavior, annotation scope) rather than adding new parameter meaning; the size-field paragraph concerns returned fields, not inputs. Cross-parameter constraints it repeats are already present in the enum's description.

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

Purpose5/5

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

States a specific verb and resource ("search indexed documents with a natural-language question") plus what it returns (titles, paths, types, text snippets). The bracketed workflow line immediately separates it from grep, outline and read, so an agent can pick it without opening schemas.

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

Usage Guidelines5/5

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

Gives an explicit pipeline (search → grep/outline → read), tells the agent to call find_paths first when the container name is fuzzy or cross-language, and tells it to call list_libraries before fanning out across cloud libraries. It also states which combinations are invalid (notes with cloud://, annotations with cloud://).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources