Simplify simple-calculator MCP example#874
Conversation
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
|
Warning Rate limit exceeded@AnuradhaKaruppiah has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 18 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughRewrote the example README to introduce an MCP Client Configuration and streamlined run steps; removed multiple example MCP configuration files, deployment Dockerfiles, and a server README; updated MCP docs to reference the client config (config-mcp-client.yml). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
examples/MCP/simple_calculator_mcp/README.md (1)
20-30: Consider consistent capitalization of "Toolkit".The documentation uses inconsistent capitalization: "NeMo Agent toolkit" (lowercase 't') appears in lines 20, 24, and 29, while the coding guidelines recommend "NeMo Agent Toolkit" (capital T). Although the guideline specifically mentions headings, consistent capitalization throughout the document improves readability and professionalism.
Apply this diff to ensure consistent capitalization:
-This example demonstrates how to integrate the NVIDIA NeMo Agent toolkit with Model Context Protocol (MCP) servers. You'll learn to use remote tools through MCP and publish Agent toolkit functions as MCP services. +This example demonstrates how to integrate the NVIDIA NeMo Agent Toolkit with Model Context Protocol (MCP) servers. You'll learn to use remote tools through MCP and publish Agent Toolkit functions as MCP services. -1. **Agent toolkit**: Ensure you have the Agent toolkit installed. If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit. +1. **Agent Toolkit**: Ensure you have the Agent Toolkit installed. If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit. -If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent toolkit. +If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
examples/MCP/simple_calculator_mcp/README.md(1 hunks)examples/MCP/simple_calculator_mcp/configs/config-combined.yml(0 hunks)examples/MCP/simple_calculator_mcp/configs/config-mcp-auth-math.yml(0 hunks)examples/MCP/simple_calculator_mcp/configs/config-mcp-date.yml(0 hunks)examples/MCP/simple_calculator_mcp/deploy_example_as/Dockerfile(0 hunks)examples/MCP/simple_calculator_mcp/deploy_external_mcp/Dockerfile(0 hunks)examples/MCP/simple_calculator_mcp/deploy_external_mcp/README.md(0 hunks)
💤 Files with no reviewable changes (6)
- examples/MCP/simple_calculator_mcp/deploy_external_mcp/README.md
- examples/MCP/simple_calculator_mcp/deploy_external_mcp/Dockerfile
- examples/MCP/simple_calculator_mcp/configs/config-combined.yml
- examples/MCP/simple_calculator_mcp/configs/config-mcp-auth-math.yml
- examples/MCP/simple_calculator_mcp/deploy_example_as/Dockerfile
- examples/MCP/simple_calculator_mcp/configs/config-mcp-date.yml
🧰 Additional context used
📓 Path-based instructions (3)
**/README.@(md|ipynb)
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Ensure READMEs follow the naming convention; avoid deprecated names; use “NeMo Agent Toolkit” (capital T) in headings
Files:
examples/MCP/simple_calculator_mcp/README.md
**/*
⚙️ CodeRabbit configuration file
**/*: # Code Review Instructions
- Ensure the code follows best practices and coding standards. - For Python code, follow
PEP 20 and
PEP 8 for style guidelines.- Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
Example:def my_function(param1: int, param2: str) -> bool: pass- For Python exception handling, ensure proper stack trace preservation:
- When re-raising exceptions: use bare
raisestatements to maintain the original stack trace,
and uselogger.error()(notlogger.exception()) to avoid duplicate stack trace output.- When catching and logging exceptions without re-raising: always use
logger.exception()
to capture the full stack trace information.Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any
words listed in the
ci/vale/styles/config/vocabularies/nat/reject.txtfile, words that might appear to be
spelling mistakes but are listed in theci/vale/styles/config/vocabularies/nat/accept.txtfile are OK.Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,
and should contain an Apache License 2.0 header comment at the top of each file.
- Confirm that copyright years are up-to date whenever a file is changed.
Files:
examples/MCP/simple_calculator_mcp/README.md
examples/**/*
⚙️ CodeRabbit configuration file
examples/**/*: - This directory contains example code and usage scenarios for the toolkit, at a minimum an example should
contain a README.md or file README.ipynb.
- If an example contains Python code, it should be placed in a subdirectory named
src/and should
contain apyproject.tomlfile. Optionally, it might also contain scripts in ascripts/directory.- If an example contains YAML files, they should be placed in a subdirectory named
configs/. - If an example contains sample data files, they should be placed in a subdirectory nameddata/, and should
be checked into git-lfs.
Files:
examples/MCP/simple_calculator_mcp/README.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: CI Pipeline / Test (arm64, 3.11)
- GitHub Check: CI Pipeline / Test (arm64, 3.13)
🔇 Additional comments (4)
examples/MCP/simple_calculator_mcp/README.md (4)
1-16: LGTM!The Apache License 2.0 header is correctly formatted with the current copyright year (2025).
48-54: No update needed –config-mcp-math.ymlexists
The documentation correctly references the existingexamples/MCP/simple_calculator_mcp/configs/config-mcp-math.ymlfile.
55-83: Verified config file exists and content matches documentation.
84-95: Referenced base config file exists and is correct. Verified thatexamples/getting_started/simple_calculator/configs/config.ymlis present and contains the expected function and workflow definitions.
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
examples/MCP/simple_calculator_mcp/README.md (4)
20-20: Inconsistent terminology: Use "NeMo Agent Toolkit" with capital T.The text uses "NVIDIA NeMo Agent toolkit" with lowercase 't', but the coding guidelines specify using "NeMo Agent Toolkit" (capital T) consistently.
Apply this diff:
-This example demonstrates how to integrate the NVIDIA NeMo Agent toolkit with Model Context Protocol (MCP) servers. You'll learn to use remote tools through MCP and publish Agent toolkit functions as MCP services. +This example demonstrates how to integrate the NVIDIA NeMo Agent Toolkit with Model Context Protocol (MCP) servers. You'll learn to use remote tools through MCP and publish Agent Toolkit functions as MCP services.
24-24: Inconsistent terminology: Use "NeMo Agent Toolkit" with capital T.Mixed usage of "Agent toolkit" and "NeMo Agent Toolkit" in the same sentence.
Apply this diff:
-1. **Agent toolkit**: Ensure you have the Agent toolkit installed. If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit. +1. **Agent Toolkit**: Ensure you have the Agent Toolkit installed. If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit.
29-29: Inconsistent terminology: Use "NeMo Agent Toolkit" with capital T.Uses "NeMo Agent toolkit" with lowercase 't'.
Apply this diff:
-If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent toolkit. +If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit.
41-45: Inconsistent terminology in section headings.Section headings use "NeMo Agent toolkit" with lowercase 't', but coding guidelines specify using "NeMo Agent Toolkit" (capital T) in headings.
Apply this diff:
-### NeMo Agent toolkit as an MCP Client +### NeMo Agent Toolkit as an MCP Client You can run the simple calculator workflow using Remote MCP tools. In this case, the workflow acts as a MCP client and connects to the MCP server running on the specified URL. Details are provided in the [MCP Client Guide](../../../docs/source/workflows/mcp/mcp-client.md). -### NeMo Agent toolkit as an MCP Server +### NeMo Agent Toolkit as an MCP Server You can publish the simple calculator tools via MCP using the `nat mcp serve` command. Details are provided in the [MCP Server Guide](../../../docs/source/workflows/mcp/mcp-server.md).
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/source/workflows/mcp/mcp-client.md(4 hunks)examples/MCP/simple_calculator_mcp/README.md(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- docs/source/workflows/mcp/mcp-client.md
🧰 Additional context used
📓 Path-based instructions (3)
**/README.@(md|ipynb)
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Ensure READMEs follow the naming convention; avoid deprecated names; use “NeMo Agent Toolkit” (capital T) in headings
Files:
examples/MCP/simple_calculator_mcp/README.md
**/*
⚙️ CodeRabbit configuration file
**/*: # Code Review Instructions
- Ensure the code follows best practices and coding standards. - For Python code, follow
PEP 20 and
PEP 8 for style guidelines.- Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
Example:def my_function(param1: int, param2: str) -> bool: pass- For Python exception handling, ensure proper stack trace preservation:
- When re-raising exceptions: use bare
raisestatements to maintain the original stack trace,
and uselogger.error()(notlogger.exception()) to avoid duplicate stack trace output.- When catching and logging exceptions without re-raising: always use
logger.exception()
to capture the full stack trace information.Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any
words listed in the
ci/vale/styles/config/vocabularies/nat/reject.txtfile, words that might appear to be
spelling mistakes but are listed in theci/vale/styles/config/vocabularies/nat/accept.txtfile are OK.Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,
and should contain an Apache License 2.0 header comment at the top of each file.
- Confirm that copyright years are up-to date whenever a file is changed.
Files:
examples/MCP/simple_calculator_mcp/README.md
examples/**/*
⚙️ CodeRabbit configuration file
examples/**/*: - This directory contains example code and usage scenarios for the toolkit, at a minimum an example should
contain a README.md or file README.ipynb.
- If an example contains Python code, it should be placed in a subdirectory named
src/and should
contain apyproject.tomlfile. Optionally, it might also contain scripts in ascripts/directory.- If an example contains YAML files, they should be placed in a subdirectory named
configs/. - If an example contains sample data files, they should be placed in a subdirectory nameddata/, and should
be checked into git-lfs.
Files:
examples/MCP/simple_calculator_mcp/README.md
🔇 Additional comments (3)
examples/MCP/simple_calculator_mcp/README.md (3)
1-16: LGTM: License header is correct.The Apache License 2.0 header is properly formatted and the copyright year 2025 is up to date.
55-83: LGTM: Configuration example is clear and well-documented.The example configuration clearly demonstrates how to use both stdio and streamable-http transports with different MCP servers. The explanatory text effectively describes the purpose of each function group.
84-95: LGTM: Running instructions are clear and complete.The step-by-step instructions for starting the MCP server and running the workflow are clear and actionable. The file paths and commands are correct.
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
|
/merge |
Description
This PR:
By Submitting this PR I confirm:
Summary by CodeRabbit
Documentation
Chores