Improve description of MCP tools - #2641
Conversation
Greptile SummaryThe PR rewrites the user-facing descriptions of the standard and agentic MCP query tools to clarify their retrieval capabilities.
|
| 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. " |
There was a problem hiding this 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)
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. " |
There was a problem hiding this comment.
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.
Update the descriptions of the
queryandagentic_queryMCP tools to clarify for the consumer what each tool's capabilities are and remove unnecessary details.