Skip to content

Conversation

@martimfasantos
Copy link
Contributor

Description

This pull request updates the mcp.ipynb example notebook to include additional usage examples for interacting with MCP servers. The changes demonstrate how to retrieve tools using get_tools_from_mcp_url and aget_tools_from_mcp_url, customize the client, filter tools, and create an agent with the retrieved tools.

Enhancements to the example notebook:

  • Added a markdown explanation and code example for using the get_tools_from_mcp_url and aget_tools_from_mcp_url functions to fetch FunctionTools from an MCP server.
  • Demonstrated how to use a custom BasicMCPClient and specify allowed tools when fetching tools from an MCP server.
  • Provided a code snippet for creating a FunctionAgent with the retrieved tools, including configuration for name, description, and system prompt.

New Package?

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • Yes
  • No

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

How Has This Been Tested?

Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.

  • I added new unit tests to cover this change
  • I believe this change is already covered by existing unit tests

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran uv run make format; uv run make lint to appease the lint gods

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 29, 2025
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@martimfasantos martimfasantos changed the title enriched llamaindex mcp example Enriched MCP Example May 29, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 29, 2025
@logan-markewich logan-markewich merged commit 4cf3709 into run-llama:main May 29, 2025
10 checks passed
@martimfasantos martimfasantos deleted the enrich-llamaindex-mcp-example branch May 29, 2025 22:38
@colca colca mentioned this pull request Jun 9, 2025
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants