Skip to main content
Glama

Search all docs in the project

search_project
Read-only

Searches all project text documents and returns matches with path, line, and column so you can locate terms, labels, citation keys, or phrases before editing.

Instructions

Searches every text doc in the project (like Overleaf's 'Search in project') and returns matches with path, line and column. Use it to find where a term, label, citation key or phrase appears before editing.

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_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesText to search for, or a JavaScript regular expression if `regex` is true.
regexNoTreat `query` as a regular expression (JavaScript syntax, matched per line).
project_idNoOverleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it.
max_resultsNoStop after this many matches (default: 200).
path_containsNoOnly search docs whose path contains this substring, e.g. 'sec/'.
case_sensitiveNoMatch case exactly (default: false).
include_comment_linesNoInclude matches on lines that are entirely LaTeX comments (starting with %). Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.1/5.0
Behavior4/5

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

The readOnlyHint annotation already covers the safety profile, so the description's job is to add scope and result detail – it does that by specifying 'every text doc' (implying non-text files are skipped) and the presence of path/line/column in results, which matters because there is no output schema. It stops short of anything about performance, result truncation, or `project_id` activation behavior, all of which live only in the schema.

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?

Two sentences, no waste, with the scope/return shape front-loaded and the intended use case second. Nothing is repeated from structured fields just for filler.

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

Completeness4/5

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

For a 7-parameter read-only search with full schema coverage and no output schema, the description covers purpose, scope and return shape adequately. The only meaningful gap is that the session/project-activation semantics of `project_id` – which are unusual and stated only in the schema – are not surfaced in the description.

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

Parameters4/5

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

Schema description coverage is 100% and each parameter (regex, max_results, path_contains, case_sensitive, include_comment_lines, project_id) is documented with defaults and semantics in the schema itself. The description adds only the loose hint that the query may be a 'term, label, citation key or phrase', which is marginal but not harmful.

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 gives a specific verb and resource ('Searches every text doc in the project') plus the return shape ('path, line and column'), which an agent can map directly onto a read-only discovery task. It implicitly separates itself from the mutating find_and_replace via 'before editing', but it never names that sibling, so the differentiation is inferred rather than stated.

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?

Clear usage context is provided: locate a term, label, citation key or phrase before editing. There are no explicit exclusions or named alternatives (e.g. 'does not replace text – use find_and_replace'), so the agent must infer the boundary with the replace tool itself.

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