Skip to main content
Glama
N0moreher0
by N0moreher0

Selective search

project_selective_search
Read-only

Rank files by relevance to multiple keyword patterns using AND/OR/NOT logic and fuzzy scoring within a bounded file set. Use it to locate the right module among candidates.

Instructions

Smart multi-query search: combine several patterns with AND/OR/NOT + fuzzy scoring. Bounded to a file set you pass in. Use when: you need to rank many files by how well they match several keywords at once (e.g. locating the right module among candidates). Avoid when: you need a single exact literal (project_search) or to inspect one file's content (project_read_file). Speed: medium; reads a bounded set of files (files_hint or a shallow listing) and scores each line. Output: selective_search: hits[] {relative_path, line_number, text, score, matched}, total_files, total_hits, truncated. Batch-safe: yes

Input Schema

NameRequiredDescriptionDefault
limitNo
queriesYes
files_hintNo
relative_pathNoPath inside the workspace (relative, or absolute inside the workspace)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.4

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds useful context beyond that: speed is medium, it reads a bounded set of files (files_hint or a shallow listing), and it is batch-safe. It does not discuss truncation behavior of the scoring or the meaning of negative weights, keeping it from a 5.

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?

Front-loaded with a one-sentence purpose, then labeled lines for usage, speed, output, and batch safety. Every line adds distinct information and nothing is repeated.

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?

With no output schema, the description does the work of describing the return shape (hits[] with relative_path, line_number, text, score, matched, plus total_files/total_hits/truncated). Remaining gap is the unexplained must/weight/limit semantics, otherwise this is nearly complete for a 4-param read tool.

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 only 25%, so the description must compensate. It explains queries (patterns combined with AND/OR/NOT, fuzzy scoring) and ties files_hint to bounding the file set, but the 'must' and 'weight' fields and the 'limit' parameter are not explicitly explained. Partial compensation justifies a 3.

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+resource (multi-query search over a bounded file set) and immediately differentiates the mechanism: combining patterns with AND/OR/NOT plus fuzzy scoring. An agent can distinguish it from project_search and project_read_file without opening the 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?

Explicit 'Use when' clause names the scenario (rank many files by multi-keyword match), and 'Avoid when' explicitly routes to project_search for a single literal and project_read_file for inspecting one file. Alternatives and conditions are fully spelled out.

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