Skip to content

Improve description of MCP tools - #2641

Open
Reza-esfandiarpoor wants to merge 3 commits into
mainfrom
mcp_desc
Open

Improve description of MCP tools#2641
Reza-esfandiarpoor wants to merge 3 commits into
mainfrom
mcp_desc

Conversation

@Reza-esfandiarpoor

Copy link
Copy Markdown
Contributor

Update the descriptions of the query and agentic_query MCP tools to clarify for the consumer what each tool's capabilities are and remove unnecessary details.

@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR rewrites the user-facing descriptions of the standard and agentic MCP query tools to clarify their retrieval capabilities.

  • Describes standard query retrieval, output formats, and optional reranking.
  • Expands the agentic-query description to explain its reasoning and adaptive search behavior.

Confidence Score: 4/5

The description changes need formatting fixes before merging because the new overlong lines will fail the repository's pre-commit checks.

Four newly added description lines exceed the active Flake8 E501 limit and are not covered by an exemption.

Files Needing Attention: nemo_retriever/src/nemo_retriever/service/mcp_server.py

Important Files Changed

Filename Overview
nemo_retriever/src/nemo_retriever/service/mcp_server.py Updates two MCP tool descriptions, but four new string-literal lines violate the enforced 120-character Flake8 limit.
Prompt To Fix All With AI
### Issue 1
nemo_retriever/src/nemo_retriever/service/mcp_server.py:555
**Descriptions violate line-length enforcement**

When the pull-request pre-commit job runs, Flake8 reports E501 for this new description line and the three corresponding lines at 584–586 because they exceed the enforced 120-character limit, causing CI to fail.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix grammar issues" | Re-trigger Greptile

name="query",
description=(
"Search ingested documents through the service VectorDB endpoint. "
"For a given query, search over a collection of documents (or document pages if multi-page) and return the top-k most relevant hits. "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Descriptions violate line-length enforcement

When the pull-request pre-commit job runs, Flake8 reports E501 for this new description line and the three corresponding lines at 584–586 because they exceed the enforced 120-character limit, causing CI to fail.

File Used: .pre-commit-config.yaml (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: nemo_retriever/src/nemo_retriever/service/mcp_server.py
Line: 555

Comment:
**Descriptions violate line-length enforcement**

When the pull-request pre-commit job runs, Flake8 reports E501 for this new description line and the three corresponding lines at 584–586 because they exceed the enforced 120-character limit, causing CI to fail.

**File Used:** `.pre-commit-config.yaml` ([source](https://github.com/nvidia/nemo-retriever/blob/961dc12667ca007f4b2815faa9a9ac388f5e1888/.pre-commit-config.yaml))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

"hits envelope with the same chunk-level fields as classic retrieval, "
"plus top-level doc_id, rank, and result_source for the selecting "
"stage; rank and result_source also remain under metadata for compatibility."
"A smart, high-level retrieval tool that understands complex queries. "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think moving away from endpoint details and describing the retrieval behaviour makes these descriptions more useful to the agent selecting a tool.

One thing i wonder is if it would be helpful to make the expected calling pattern more explicit? Since agentic_query performs decomposition and iterative retrieval internally, one call should usually be sufficient for a complex or multi-part query. This would distinguish it from query and help avoid redundant decomposition or repeated calls by the outer agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants