Skip to main content
Glama

Ranked search across projects

search
Read-only

Find passages about a topic across one or many Overleaf projects using relevance-ranked full-text search. Returns file:line ranges with snippets; use for conceptual queries, not exact matches.

Instructions

Relevance-ranked full-text search (BM25 with fuzzy and prefix matching) that finds passages about a topic, e.g. "related work on diffusion models", across one or many projects. Returns file:line ranges with snippets; read_file or get_section can then fetch the text. Read-only. For exact text or a regex use grep instead.

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
limitNoHow many passages to return (default 10)
queryYesWhat to look for, in words, e.g. "evaluation metrics"
refreshNoRe-download the projects before searching
matchAllNoRequire every query word to appear
projectsNoProjects to cover: a list of names/ids, or "all". Defaults to the pinned projects, or the 25 most recently updated if none are pinned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.1.4
    • changedInput schema / properties / limit / description
      Previous value: -"Default 10"New value: +"How many passages to return (default 10)"
    • addedInput schema / properties / query / description
      Added value: +"What to look for, in words, e.g. \"evaluation metrics\""
    • addedInput schema / properties / refresh / description
      Added value: +"Re-download the projects before searching"
  2. First observedv2.1.1

TDQS

A4.5/5.0
Behavior4/5

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

With readOnlyHint and openWorldHint already supplied, the description adds real context: the ranking method (BM25 with fuzzy and prefix matching, so results are approximate rather than exact), the return shape (file:line ranges with snippets), and an explicit read-only confirmation. It does not discuss result caps or cost of the refresh-triggered re-download, but the schema already bounds limit and documents refresh.

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

Conciseness5/5

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

Three short sentences, front-loaded with what the tool does and its ranking behavior, followed by return shape and the grep alternative. Every sentence carries distinct information: no restatement of the title, no filler.

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?

For a five-parameter read tool with no output schema, the description covers purpose, ranking semantics, return format (file:line plus snippet), the follow-up tool for full text, and the sibling alternative. An agent has everything needed to call it correctly and to 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%, so every parameter already carries documentation and the baseline is 3. The description adds only indirect hints — "across one or many projects" gestures at the projects parameter and "snippets" explains why results are partial — but supplies no added syntax or format detail beyond the schema.

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?

The description names a specific verb and resource (relevance-ranked full-text search / BM25 with fuzzy and prefix matching) and states exactly what it finds: passages about a topic across one or many projects. It is clearly distinguishable from the sibling grep, which is named, without needing to open either schema.

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?

It gives an explicit when-to-use condition (find passages about a topic, e.g. "related work on diffusion models") and an explicit when-not with the alternative named ("For exact text or a regex use grep instead"). It also closes the loop on next steps by pointing to read_file or get_section for fetching full text.

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