Skip to main content
Glama
jenkeeri
by jenkeeri

Find files in OpenGrok

opengrok_find_file
Read-onlyIdempotent

Locate source files by path, file name, wildcard, or regex pattern across OpenGrok projects and return matching file paths for lookup or reading.

Instructions

Find files by path or file name. Returns file paths only. Examples: "main.cpp" (name), "*.sql" (wildcard), "src/net" (directory), "/.test..py/" (regex). Default scope: none (all projects).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoFile type (analyzer name), as for opengrok_search.
startNoOffset of the first file to return (default 0); use the value a previous page suggested.
projectsNoProjects to search (default: none (all projects)). Names from opengrok_list_projects.
max_resultsNoFiles per page (default 30, max 100).
all_projectsNoSearch every project instead of the default. Ignored if projects is set.
path_patternYesPath or name pattern.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and open-world behavior, so the safety profile is covered. The description usefully adds the return shape ("file paths only") and default scope, both of which matter for a tool with no output schema. Pagination behavior lives in the schema rather than the description.

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 purpose, then return shape, then a compact single-line example block, then the scope default. Every sentence carries 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 "returns file paths only" statement is essential and present, and the scope default is called out. Pagination and project-selection mechanics are handled by the schema, so the description is sufficient, though it does not address result volume or empty-result behavior.

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 coverage is 100% so the structured fields already document all six parameters. The description still earns credit by clarifying the format of path_pattern (name vs wildcard vs directory vs regex), which the schema only labels as "Path or name pattern" — a genuine semantic addition.

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?

States a specific verb and resource ("Find files by path or file name") and immediately scopes the result ("Returns file paths only"). This implicitly separates it from opengrok_get_file (content retrieval) and opengrok_search (content matching), though it never names those siblings explicitly.

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

Usage Guidelines3/5

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

Provides concrete input examples and states the default scope ("none (all projects)"), which implies usage context. However there is no explicit guidance on when to prefer this over opengrok_search or opengrok_get_file, so the routing decision is left to inference.

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